How to randomly assign numbers to names?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to have numbers randomly assinged to names. The numbers will all be 5
digits. I was told that excel can do this but I can't seem to figure it out.

Please help!!!
 
Say your list of names was in A1 to A100.

Enter this formula in B1:

=INT(RAND()*(99999+1-10000)+10000)

And copy down to B100.

Then, you can turn *off* auto calc by:

<Tools> <Options> <Calculation> tab,
And click on "Manual"

Now, every time you hit <F9>, you'll get a new set of random numbers next to
your list of names.
 
I forgot to mention, I could have posted this formula:

=INT(RAND()*(90000)+10000)

BUT, I left the formula in an uncalculated form so that you could change the
parameters yourself if you wished.

99,999 is the top limit of number to return,
while 10,000 is the bottom limit.
This follows your request for a 5 digit number.
 
Hi Empress,

You can also use =RANDBETWEEN(10000,99999)
If RANDBETWEEN is not available you will need to
run the Analysis Tool Pack add-in.

HTH
Martin
 
Actually, I'm not too sure.

*Don't* have to enable the ATP when using Rand(), but you do if you're using
RandBetween().<g>
 
Yeah! That's true RD,

On face value it does appear to be shorter, 2 functions and 2 calculations
versus 1 function plus the enabling of the ATP.

To my mind it should be shorter, but seeng as how my thoughts are based
on nothing more than gut feeling, they don't have much real value.

So does anyone actually know the answer?

Does enabling the ATP use more resources than just hard-drive space?
I guess what I'm asking is does Excel have to go down the street, round
the corner and into another building to access the ATP, or can it access
the ATP on a direct line without having to leave it's own desk.

Regards
Martin
 

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