![]() |
How to randomly assign numbers to names?
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!!! |
How to randomly assign numbers to names?
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. -- HTH, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "Empress" wrote in message ... 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!!! |
How to randomly assign numbers to 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. -- HTH, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "Ragdyer" wrote in message ... 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. -- HTH, RD -------------------------------------------------------------------------- - Please keep all correspondence within the NewsGroup, so all may benefit ! -------------------------------------------------------------------------- - "Empress" wrote in message ... 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!!! |
How to randomly assign numbers to names?
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 |
How to randomly assign numbers to names?
P.S. Does that shorten things up RD <vbg
|
How to randomly assign numbers to names?
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 -- Regards, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "MartinW" wrote in message ... P.S. Does that shorten things up RD <vbg |
How to randomly assign numbers to names?
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 |
All times are GMT +1. The time now is 10:59 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com