PDA

View Full Version : customized alphabetic number (A-Z, AA, AB, AC... ) HELP!!!



Kumarcoolz
07-22-2013, 07:30 PM
Hi Guys,
I an looking for a customized alphabetic number in the many tables i use in my document. the default followed A-Z, AA,BB…format. I have been trying to change them to A-Z, AA, AB, AC... (similar to the numbering of Rows in Excel sheets).

I have got a formula from a website that can change this pre-defined feature, but I am not able to find out how & where to use them. Please help me.

The formula is:
{ Quote { Set ABC { = { ABC } + 1 } }{ SET ABC2 { IF { ABC } > 26 "{ IF { = MOD({ ABC }, 26) } = 1 "{ = { ABC2 } + 1 }" "{ ABC2 }" }" "{ ABC2 }" } }{ SET ABC1 { IF ABC1 < 26 "{ = { ABC1 } + 1 }" "1" } }{ If { ABC } < 27 "{ ABC1 \* ALPHABETIC }" "{ ABC2 \* ALPHABETIC }{ ABC1 \* ALPHABETIC }" } }



Kindly help me is improve upon this or suggest a better solution to this problem

SamT
07-23-2013, 07:18 AM
I'm not real familiar with the situation, but if this doesn't work, it might give you an idea that will:Option Explicit
Function NewAlphaNum(OldNumber As String) As String

Dim AlphaNum As String
AlphaNum = OldNumber

Select Case Len(AlphaNum)
&#160;&#160;Case 2
&#160;&#160;&#160;&#160;AlphaNum = "A" & Right(AlphaNum, 1)
&#160;&#160;Case 3
&#160;&#160;&#160;&#160;AlphaNum = "B" & Right(AlphaNum, 1)
&#160;&#160;End Select
&#160;&#160;
NewAlphaNum = AlphaNum

End Function