Generating unique sequential numbers in Excel

  • Thread starter Thread starter michael
  • Start date Start date
M

michael

I'd like to create a button (macro) that will generate a
unique sequential number (or a random number) with 5
digits. How do I do this.
I use Excel XP.

Thanks,
Michael
 
For a few different techniques see the Excel | Tutorial | 'Random
Selection' page of my web site.

--
Regards,

Tushar Mehta, MS MVP -- Excel
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 
Because 10000 is the lowest 5 digit integer and 99999 is the highest
and the formula will return random values >=10000 and <=99999
if I would have used 89999 I would have left out 90000-99999
Not that I know if this is what the OP wanted since he never posted back
 
Thank you for the prompt response Peo,

Sorry to be so dense but I assume from your answer that your formula it is a
generalised formula:

=INT(RAND()*(Highest No - Lowest No)+1000)

but you used real numbers. I tend to assume that when people use real
numbers they mean specifically those numbers and I could not see why when
99999-10000 was 89999 you had not simply used that number in the first
place.

I will have to start practising thinking BIG!

Thank you

Sandy
 
Back
Top