+ Reply to Thread
Results 1 to 16 of 16

Formula to Generate a list of codes

Hybrid View

  1. #1
    Registered User
    Join Date
    10-01-2013
    Location
    Cape town
    MS-Off Ver
    Excel 2007
    Posts
    11

    Post Formula to Generate a list of codes

    Hi, I am trying to generate a set of codes in alphabetical and numeral order. Example: 14kaa111, 14kbb111, 14kcc111 and then continue to become: 14kaa222, 14kaa333... and so on..

    Can this be done? I have tried to type in 14kaa111, 14kbb111 and 14kcc111 in the first 3 cells and then extending them from there but it does not seem to work.

    Any ideas?

    Here is an example of what I am trying to get:
    Book1.xlsx

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Formula to Generate a list of codes

    In A1 Cell

    ="14k"&REPT(CHAR(96+ROW(1:1)),2)&REPT(1,3)

    In B1 Cell

    ="14k"&REPT(CHAR(96+ROW(1:1)),2)&REPT(ROW(2:2),3)

    Drag both the formula's down...


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    10-01-2013
    Location
    Cape town
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Formula to Generate a list of codes

    Wow thank you! It works perfectly.

    If I wanted to change the 14kaa111, 14kbb111
    to
    14kaa111, 14kab111, 14kac111...



    What should I change in the formula?
    Thank you so much again

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Formula to Generate a list of codes

    Try this...

    ="14k"&CHAR(97)&CHAR(96+ROW(1:1))&REPT(1,3)

  5. #5
    Registered User
    Join Date
    10-01-2013
    Location
    Cape town
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Formula to Generate a list of codes

    Thank you!

    Would it be to much to ask if you could explain what exactly you did? I mean, how you compiled the formula?


  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Formula to Generate a list of codes

    Enter this in a cell and check what result it's getting

    =CODE("a")

    In Another cell

    =CODE("b")

    So the code number 97 belongs to lower case "a".
    Adding +1 to 97 will make it as 98. Which is the code number of "b"

    Enter this in a cell and check what result it's getting

    =ROW(1:1)

    Result will be 1

    Drag it down and check what it's doing.

    When you drag the above formula down then it will get adjusted to

    =ROW(2:2)

    Which results 2.

    Enter this in a cell and check what result it's getting

    =REPT(Text,NumberOfTimeItNeedsToBeRepeated)

    =REPT("Animella",3)

    Will result AnimellaAnimellaAnimella

    Anything withing Double Quotes is a stable value "14k"

    So just given the formula based on the above usages

  7. #7
    Registered User
    Join Date
    10-01-2013
    Location
    Cape town
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Formula to Generate a list of codes

    Also I don't want the characters to be more than 8 (including the 14k)

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Formula to Generate a list of codes

    Quote Originally Posted by Animella View Post
    Also I don't want the characters to be more than 8 (including the 14k)
    But the examples which you shown is not more than 8 characters

  9. #9
    Registered User
    Join Date
    10-01-2013
    Location
    Cape town
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Formula to Generate a list of codes

    I know, but when I pull down B1 the numbers become 14kaa1010.. 1111 and 1212 and so on.

+ 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. [SOLVED] Generate a range of sequential alpha numeric codes based on a from and to value
    By kenny.fsw in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-17-2013, 09:53 AM
  2. Using Formulas to Generate SKU codes
    By X-tremejoe in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-09-2013, 03:55 PM
  3. Using Formulas to Generate SKU codes
    By X-tremejoe in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-09-2013, 03:33 PM
  4. [SOLVED] need formula to count number of cells that contain any of a LARGE list of zip codes
    By Security in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-14-2012, 10:37 AM
  5. How to generate a LIST from codes
    By bitswit in forum Excel General
    Replies: 8
    Last Post: 08-22-2010, 05:33 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