+ Reply to Thread
Results 1 to 4 of 4

Formula to Generate AAAAA to ZZZZZ

  1. #1
    Registered User
    Join Date
    02-08-2014
    Location
    Jacksonville
    MS-Off Ver
    Excel 2013
    Posts
    10

    Formula to Generate AAAAA to ZZZZZ

    I found the below formula to generate a list of AAA to ZZZ. I need to generate all the possibilities for 5 alpha characters from AAAAA to ZZZZZ. I cannot figure out the syntax to modify this formula to add two more characters.

    In cell B2(Drag formula down for list):
    =UPPER(IF(ROW(A703)>18278,CHAR(96+INT(MOD(ROW(A703)-18279,456976)/17576)+1),
    "")&IF(ROW(A703)>702,CHAR(96+INT(MOD(ROW(A703)-703,17576)/676)+1),"")&IF(ROW(A703)>26,CHAR(96+INT(MOD(ROW(A703)-27,676)/26)+1),"")&CHAR(97+MOD(ROW(A703)
    -1,26)))

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Formula to Generate AAAAA to ZZZZZ

    Row\Col
    B
    2
    AAAAA
    3
    AAAAB
    4
    AAAAC
    26
    AAAAY
    27
    AAAAZ
    28
    AAABA


    In B2:

    = CHAR(MOD(INT((ROWS(B$1:B2)-2)/26^4), 26) + 65)
    & CHAR(MOD(INT((ROWS(B$1:B2)-2)/26^3), 26) + 65)
    & CHAR(MOD(INT((ROWS(B$1:B2)-2)/26^2), 26) + 65)
    & CHAR(MOD(INT((ROWS(B$1:B2)-2)/26^1), 26) + 65)
    & CHAR(MOD(INT((ROWS(B$1:B2)-2)/26^0), 26) + 65)
    Last edited by shg; 03-23-2015 at 01:08 PM.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    02-08-2014
    Location
    Jacksonville
    MS-Off Ver
    Excel 2013
    Posts
    10

    Re: Formula to Generate AAAAA to ZZZZZ

    Thanks! That got me what i needed!

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Formula to Generate AAAAA to ZZZZZ

    You're welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to dynamically generate the Formula
    By simi in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-04-2013, 01:26 PM
  2. [SOLVED] using formula to generate values
    By penfold1992 in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 10-24-2012, 07:21 AM
  3. Formula to generate last day of month
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-20-2012, 04:25 PM
  4. generate a random number and use if function to generate new data
    By Dogdoc1142 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-25-2006, 10:50 PM
  5. Replies: 1
    Last Post: 07-20-2005, 11:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1