+ Reply to Thread
Results 1 to 11 of 11

generating auto alpha-numeric in one column based upon text in another column

  1. #1
    Registered User
    Join Date
    07-25-2017
    Location
    New Delhi
    MS-Off Ver
    MS OFFICE 2013
    Posts
    8

    Question generating auto alpha-numeric in one column based upon text in another column

    Dear Frends,

    I have recently register myself in excelforum. I am preparing a database of our ground staff where I want to make a separate ID based upon the name of the staff in alphabetic order. My question is can we add a serial number which is of alphanumeric character and the ID starts with the Alphabet and continue with numeric value an example is as follows:

    Column A ColumnB
    Serial No. Name

    A001 Ajay Sharma
    A002 Anil Kumar
    A003 Asutosh Chand
    B001 Beerbal Kumar
    B002 Budhu Ram
    C001 Chandan Singh
    D001 Deaya Shanker Tiwari


    I want the ID number enters automatically based upon First letter of Name and the numeric value to be continuous. And as the first letter of Name change from "A" to "B" the ID number should starts from B001 and continue to increase until next alphabet and so on.


    Please suggest me the creation of suitable formula using appropriate function.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,868

    Re: generating auto alpha-numeric in one column based upon text in another column

    In A1 copied down:

    =LEFT(B1,1)&TEXT(COUNTIF(B$1:B1,LEFT(B1,1)&"*"),"000")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,868

    Re: generating auto alpha-numeric in one column based upon text in another column

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  4. #4
    Registered User
    Join Date
    07-25-2017
    Location
    New Delhi
    MS-Off Ver
    MS OFFICE 2013
    Posts
    8

    Re: generating auto alpha-numeric in one column based upon text in another column

    This formula doesn't solve my purpose, although it generate alphanumeric number but not as per requirement. It resulted N001, N002 and so on....but I want number to be synchronous with the first letter of the name A001 A002........B001 B002.....like that.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,868

    Re: generating auto alpha-numeric in one column based upon text in another column

    It works exactly as you requested. If your first code is in A2 and name in B2, then you need to change the references in the formula to match:

    =LEFT(B2,1)&TEXT(COUNTIF(B$2:B2,LEFT(B2,1)&"*"),"000")

    Then drag copy down. See attached.

    Excel 2016 (Windows) 32 bit
    A
    B
    2
    A001 Ajay Sharma
    3
    A002 Anil Kumar
    4
    A003 Asutosh Chand
    5
    B001 Beerbal Kumar
    6
    B002 Budhu Ram
    7
    C001 Chandan Singh
    8
    D001 Deaya Shanker Tiwari
    Sheet: Sheet1
    Attached Files Attached Files
    Last edited by AliGW; 07-26-2017 at 02:06 AM.

  6. #6
    Registered User
    Join Date
    07-25-2017
    Location
    New Delhi
    MS-Off Ver
    MS OFFICE 2013
    Posts
    8

    Re: generating auto alpha-numeric in one column based upon text in another column

    Thanks a million, my this purpose is solved. However, what if I want that ID number should entered automatically:

    I tried the simple way but it entered only first alphabet on the name. The formula I used is:

    =If(IsBlank(B3)," ",B2+1)

    How can we merge the two formulas?

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,868

    Re: generating auto alpha-numeric in one column based upon text in another column

    It is entered automatically, but you can amend it so that it doesn't appear until you add a name like this:

    =IF(B2="","",LEFT(B2,1)&TEXT(COUNTIF(B$2:B2,LEFT(B2,1)&"*"),"000"))

    Copy this into A2 and drag down as far as you like. Job done! Amended example attached.
    Attached Files Attached Files
    Last edited by AliGW; 07-26-2017 at 02:39 AM.

  8. #8
    Registered User
    Join Date
    07-25-2017
    Location
    New Delhi
    MS-Off Ver
    MS OFFICE 2013
    Posts
    8

    Re: generating auto alpha-numeric in one column based upon text in another column

    Thanks ones again, its done.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,868

    Re: generating auto alpha-numeric in one column based upon text in another column

    You're welcome!

  10. #10
    Banned User!
    Join Date
    10-29-2012
    Location
    Europe
    MS-Off Ver
    2013, 2016
    Posts
    318

    Re: generating auto alpha-numeric in one column based upon text in another column

    Sorry.........

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,868

    Re: generating auto alpha-numeric in one column based upon text in another column

    Quote Originally Posted by Indi_Ra View Post
    Sorry.........

+ 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. Replies: 9
    Last Post: 11-18-2013, 07:40 AM
  2. [SOLVED] change excel auto column headers from numeric to alpha
    By MarcieinHawaii in forum Excel General
    Replies: 2
    Last Post: 02-14-2006, 05:25 PM
  3. column changed from alpha to numeric
    By maxzsim in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-06-2005, 12:05 AM
  4. [SOLVED] column changed from alpha to numeric
    By maxzsim in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-03-2005, 04:05 AM

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