Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Increment Letter in a String
Hi,
I am sorry if it is repost. I am relatively new to macros. I want to increment letter in a string present in a cell. If the cell value is "A" I want to make it "B" etc. However, if the cell value is "Z", I want to change it to "AA". If it is "AA", it should change to "AB" and so on. I wrote following code for increment letters: NextIndex = Asc(char) + 1 CellOfInterest.Value = Chr(NextIndex) Above code changes A to B, B to C and so on. However, it does not change Z to AA. It just gives me next ASCII value ([). Is there any way to make this happen? Any help would be greatly appreciated! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formula to Increment by Letter not Number | Excel Worksheet Functions | |||
Formula copy paste down in a sheet but change row letter increment | Excel Discussion (Misc queries) | |||
Change 3 letter text string to a number string | Excel Discussion (Misc queries) | |||
Increment/Increment letter in alphabetical order | Excel Programming | |||
Need help, how to increment numbers for each unique text string. | Excel Programming |