Random Auto Number

emdiesse

Registered User.
Local time
Today, 05:27
Joined
Feb 1, 2006
Messages
36
How can I make random auto numbers 8 digits in length (including leading zeros) and always positive?

Thank you
 
Look up randomize and Rnd in your help file, the following formula should give you what you need, a number between 1 and 99,999,999 with leading zeros.

format(((99999999 * Rnd) + 1),"00000000")
 
antomack said:
Look up randomize and Rnd in your help file, the following formula should give you what you need, a number between 1 and 99,999,999 with leading zeros.

format(((99999999 * Rnd) + 1),"00000000")

But I would like it to come up with unique numbers that have not already been chosen.
 

Users who are viewing this thread

Back
Top Bottom