Six digit random number generator?
Is there a formula or function I can use to generate 500 or so six digit random numbers? I need to assign unique six digit numbers for keypad access to a restricted area.
Thanks,
Bjohnston
Is there a formula or function I can use to generate 500 or so six digit random numbers? I need to assign unique six digit numbers for keypad access to a restricted area.
Thanks,
Bjohnston
Hi Bjohnston,
Formula in B2 =RANDBETWEEN(0,9)
Fill right to G2 then fill down.
Formula in H2 (and fill down) =B2&C2&D2&E2&F2&G2
Formula in I2 (and fill down) =COUNTIF(H$1:H2,H2)
That will check for duplicates. Any value greater than 1 is not unique.
Now select Column H, copy then Menu > Edit > Paste Formula Results
That will freeze the values.
Regards,
Ian.
Or:
In A2, down:
=RIGHT("00000"&INT(RAND()×1000000),6)
The check for duplicates in B2, filled down:
=COUNTIF(A,A2)
SG
Six digit random number generator?