+ Reply to Thread
Results 1 to 12 of 12

Create an alphanumeric sequence

  1. #1
    Registered User
    Join Date
    09-14-2009
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Create an alphanumeric sequence

    I want to create a 4 character alphanumeric sequence. The sequence is to be like this: a1a1-z10z10. If it's a number, increment 1 until you reach 10, then move to the next column, if it's a letter, increment a until z, then move to the next column. Excel's autofill feature doesn't seem to work well for me due to the letters involved, so if someone has a macro handy that would be great.

    Thanks in advance for any help.
    Last edited by footsoreaxe; 09-15-2009 at 12:28 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Create an alphanumeric sequence

    Please create a more distinctive sample in an actual workbook. Mock it up manually so it is visibly clear what you're goal is.

    Click GO ADVANCED and use the paperclip icon to post up your workbook.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    09-14-2009
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Create an alphanumeric sequence

    Hi,

    I'm trying to create a sequence from a1a1 to z10z10. So for the first column I want it to list a1a1-a1a10 and then in the second column a1b1-a1b10 and so on. After that it should go from a1z10-a2a1 and repeat the first part again. After those are done it should go b1a1-b1a10 and so on. Hope you can understand what I mean by that? So instead of creating a 1-100 sequence or a aaa-zzz sequence, I need to create it from a1a1-z10z10.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Create an alphanumeric sequence

    Please create a more distinctive sample in an actual workbook. Mock it up manually so it is visibly clear what you're goal is.

    Click GO ADVANCED and use the paperclip icon to post up your workbook.

  5. #5
    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: Create an alphanumeric sequence

    In A1,

    = ADDRESS( MOD( INT(COLUMN() - 1) / 26, 10) + 1, INT( (COLUMN() + 259) /260), 4)
    & ADDRESS(ROW(), MOD(COLUMN()-1, 26) + 1, 4)


    Copy down to A10 and across to column IYZ.
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Registered User
    Join Date
    09-14-2009
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Create an alphanumeric sequence

    Quote Originally Posted by shg View Post
    In A1,

    = ADDRESS( MOD( INT(COLUMN() - 1) / 26, 10) + 1, INT( (COLUMN() + 259) /260), 4)
    & ADDRESS(ROW(), MOD(COLUMN()-1, 26) + 1, 4)


    Copy down to A10 and across to column IYZ.
    Thanks that worked great! Would you also be able to tell me the formula to make it all into one column? A1A1-Z10Z10 all in column A.

    Thanks again.

  7. #7
    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: Create an alphanumeric sequence

    So for the first column I want it to list a1a1-a1a10 and then in the second column a1b1-a1b10 and so on
    That's what you asked for ...

  8. #8
    Registered User
    Join Date
    09-14-2009
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Create an alphanumeric sequence

    Quote Originally Posted by shg View Post
    That's what you asked for ...
    I know that's what I asked for, but I was also wondering if you could give me the formula for just listing it in one column as well (or do you want me to create a new thread?).

    Thanks.

  9. #9
    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: Create an alphanumeric sequence

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    09-16-2009
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    3

    deleted..

    deleted..deleted
    Attached Files Attached Files
    Last edited by suppaiyah; 09-16-2009 at 08:39 AM.

  11. #11
    Registered User
    Join Date
    11-25-2009
    Location
    Ramstein, Germany
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Create an alphanumeric sequence

    I need to create a spread sheet that lists as so

    A-1A
    A-1B
    A-1C
    A-2A
    A-2B
    A-2C

    So it will be A-1A-Z-8C Can anyone help me out by giving me the formula for it?

  12. #12
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Create an alphanumeric sequence

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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