Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Incementing alpha characters in Excel? 1

Status
Not open for further replies.

Apollo6

Technical User
Jan 27, 2000
418
US
In cell "A1", I have "AAA". I want to populate down column "A" incrementing the original value as follows:

A1 = AAA
A2 = AAB
A3 = AAC

Once it reaches "AAZ" the next cell should be "ABA" as follows:

A27 = ABA
A28 = ABB
A29 = ABC

And so on...

Ultimately, I am looking for an alpha 3-character code starting with "AAA". If this is not the best way to go about this I am open for suggestions. Any suggestions or help would be greatly appreciated.
 

Hi,

You don't really need VB code

or

you could code a solution from this spreadsheet example
[tt]
=CHAR(65+MOD(INT((ROW()-1)/26^2),26^2))&CHAR(65+MOD(INT((ROW()-1)/26),26))&CHAR(65+MOD(INT((ROW()-1)),26))[/tt]

Skip,

[glasses] [red]A palindrome gone wrong?[/red]
A man, a plan, a ROOT canal...
PULLEMALL![tongue]
 
I wasn't sure if it was a VB loop of sorts or not. That formula is awesome! Thanks a ton!!!
 

slight correction...
[tt]
=CHAR(65+MOD(INT((ROW()-1)/26^2),26))&CHAR(65+MOD(INT((ROW()-1)/26^1),26))&CHAR(65+MOD(INT((ROW()-1)/26^0),26))
[/tt]

Skip,

[glasses] [red]A palindrome gone wrong?[/red]
A man, a plan, a ROOT canal...
PULLEMALL![tongue]
 


Of course you could write a program instead of pasting the formula into a column. ;-)

Skip,

[glasses] [red]A palindrome gone wrong?[/red]
A man, a plan, a ROOT canal...
PULLEMALL![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top