Autogenerate alphanumeric ID numbers in Excel?

Solved/Closed
NoTechKnowledge64 - Feb 25, 2022 at 03:14 PM
vcoolio Posts 1410 Registration date Thursday July 24, 2014 Status Moderator Last seen May 23, 2024 - Mar 2, 2022 at 05:26 PM
Hiya!

Let me start off by saying I am NOT a tech person so I don't even know if this is possible. I am trying to create an excel sheet where I can get a random alphanumeric number generated to use for customer IDs. I would need it to be sequential and generate a new number every time I take one.

For example:

Autogenerated Number - LA4956
(I then take that number and put it in my client file)

New Number auto-populates - LA4957
(My coworker then takes that number for their client)

New Number auto-populates - LA4958
(and so on and so forth)

Is this possible?


System Configuration: Windows / Chrome 98.0.4758.102
Related:

3 responses

vcoolio Posts 1410 Registration date Thursday July 24, 2014 Status Moderator Last seen May 23, 2024 262
Feb 26, 2022 at 05:38 AM
Hello NTK,

I'm not sure how you'd want this set out in your worksheet, but you could start with this:-

In cell A1of your main worksheet, place the first ID you'd like to use; e.g LA1000

In a standard module, place the following code and assign it to a button:-

Sub CreatSequencedNos()

    Sheet1.[A1] = Left([A1], 2) & (Right([A1], 4) + 1)
    
End Sub


I've assumed your main sheet is sheet1 in the code.

Once you're done with 'LA1000', click on the button to bring up the next sequential ID number.

I've attached a sample workbook at the following link for you to have a look at:-

https://wetransfer.com/downloads/99fe083f98cf1166a3aaf94748aa465520220226103431/90577c

Click on the button to change the ID to the next sequential ID.

I hope that this helps.

Cheerio,
vcoolio.
0