Random 8 character ID number

  • Thread starter Thread starter KennyS
  • Start date Start date
K

KennyS

I need to know the formula to create a column of random 8 character ID
numbers, preferably with a set prefix of 3 numbers. I'd be REALLY happy if
I could create it with random text and numerals, but it doesn't have to be.

(where 123 is the constant)
ie:
12386756
12337288
12378645
12321356

or

123g568e
1237t7er
12397u23

Thanks in advance for your help.

Kenny
 
English version

Kenny,

Put in A1: 1234567890abcdefghijklmnopqrstuvwxyz
and in A2:
="123"&MID(A$1,INT(RAND()*36)+1,1)&MID(A$1,INT(RAND()*36)+1,1)&MID(A$1,INT(RAND()*36)+1,1)&MID(A$1,INT(RAND()*36)+1,1)&MID(A$1,INT(RAND()*36)+1,1)

Best regards,

Michel BRUYERE
==============================================================
Version française

Kenny,

Placer en A1 : 1234567890abcdefghijklmnopqrstuvwxyz
et en A2 :
="123"&STXT(A$1;TRONQUE(ALEA()*36)+1;1)&STXT(A$1;TRONQUE(ALEA()*36)+1;1)&STXT(A$1;TRONQUE(ALEA()*36)+1;1)&STXT(A$1;TRONQUE(ALEA()*36)+1;1)&STXT(A$1;TRONQUE(ALEA()*36)+1;1)

Salutations.

Michel BRUYERE
 
Hi Kenny,

Adding to Michel's solution, you can name the formula
MID(A$1,INT(RAND()*36)+1,1) and thereby shorten the overall formula.

Go to Insert > Name > Define > enter name > Refers to >
=MID(A$1,INT(RAND()*36)+1,1) > OK.

So if you named the formula X, then your worksheet formula would be:

="123"&X&X&X&X&X

HTH
Regards,
Howard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top