Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
Stephen Larivee
 
Posts: n/a
Default generate unique random numbers

I have a list of 600 names. I would like to generate a random number
between 1 and 600 for each person but not have any repeating numbers. So
far I have used
=rand()*600
This give me the correct number range but many of the numbers repeat.

Can I accomplish what I want to do?


  #2   Report Post  
Posted to microsoft.public.excel.newusers
Max
 
Posts: n/a
Default generate unique random numbers

One way ..

Suppose serial nos (1,2,3 ... 600)
and names are in cols A and B, from row1 to 600

Put in C1: =INDEX($A$1:$A$600,RANK(D1,$D$1:$D$600))
Put in D1: =RAND()
Select C1:D1, fill down

C1 returns the random shuffle of the serial nos that's required
Press F9 key to regenerate
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Stephen Larivee" wrote in message
. ..
I have a list of 600 names. I would like to generate a random number
between 1 and 600 for each person but not have any repeating numbers. So
far I have used
=rand()*600
This give me the correct number range but many of the numbers repeat.

Can I accomplish what I want to do?




  #3   Report Post  
Posted to microsoft.public.excel.newusers
Stephen Larivee
 
Posts: n/a
Default generate unique random numbers

Thank you!!!!! I will give it a try.


"Max" wrote in message
...
One way ..

Suppose serial nos (1,2,3 ... 600)
and names are in cols A and B, from row1 to 600

Put in C1: =INDEX($A$1:$A$600,RANK(D1,$D$1:$D$600))
Put in D1: =RAND()
Select C1:D1, fill down

C1 returns the random shuffle of the serial nos that's required
Press F9 key to regenerate
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Stephen Larivee" wrote in message
. ..
I have a list of 600 names. I would like to generate a random number
between 1 and 600 for each person but not have any repeating numbers. So
far I have used
=rand()*600
This give me the correct number range but many of the numbers repeat.

Can I accomplish what I want to do?






  #4   Report Post  
Posted to microsoft.public.excel.newusers
Max
 
Posts: n/a
Default generate unique random numbers

You're welcome !
Let us know how it went ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Stephen Larivee" wrote in message
...
Thank you!!!!! I will give it a try.



  #5   Report Post  
Posted to microsoft.public.excel.newusers
Stephen Larivee
 
Posts: n/a
Default generate unique random numbers

Tried it but all of the numbers are either 0 or 1. Where did I go wrong???


"Max" wrote in message
...
One way ..

Suppose serial nos (1,2,3 ... 600)
and names are in cols A and B, from row1 to 600

Put in C1: =INDEX($A$1:$A$600,RANK(D1,$D$1:$D$600))
Put in D1: =RAND()
Select C1:D1, fill down

C1 returns the random shuffle of the serial nos that's required
Press F9 key to regenerate
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Stephen Larivee" wrote in message
. ..
I have a list of 600 names. I would like to generate a random number
between 1 and 600 for each person but not have any repeating numbers. So
far I have used
=rand()*600
This give me the correct number range but many of the numbers repeat.

Can I accomplish what I want to do?








  #6   Report Post  
Posted to microsoft.public.excel.newusers
Stephen Larivee
 
Posts: n/a
Default generate unique random numbers

My mistake. I made an error in the formula. I corrected it and it seems to
be doing just what I wanted. Thank you very much.



"Max" wrote in message
...
One way ..

Suppose serial nos (1,2,3 ... 600)
and names are in cols A and B, from row1 to 600

Put in C1: =INDEX($A$1:$A$600,RANK(D1,$D$1:$D$600))
Put in D1: =RAND()
Select C1:D1, fill down

C1 returns the random shuffle of the serial nos that's required
Press F9 key to regenerate
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Stephen Larivee" wrote in message
. ..
I have a list of 600 names. I would like to generate a random number
between 1 and 600 for each person but not have any repeating numbers. So
far I have used
=rand()*600
This give me the correct number range but many of the numbers repeat.

Can I accomplish what I want to do?






  #7   Report Post  
Posted to microsoft.public.excel.newusers
Max
 
Posts: n/a
Default generate unique random numbers

Glad to hear that, Stephen !
Thanks for feeding back ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Stephen Larivee" wrote in message
. ..
My mistake. I made an error in the formula. I corrected it and it seems

to
be doing just what I wanted. Thank you very much.



  #8   Report Post  
Posted to microsoft.public.excel.newusers
David J. Braden
 
Posts: n/a
Default generate unique random numbers

Alternatively, get PopTools, a free add-in (Google will turn it up).
Among many very-well implemented variate generators are a host of other
functions. Among them is Shuffle. Here's how you can also keep location
and sizes of your lists more manageable:
Enter 1 through 600 (or whatever) into a column; it might be, say, in
C3:C602. InsertNameDefine that range as Indexes. Into another column,
say D3:D602, enter your list of names, and InsertNameDefine it as
NameList. Into E3:E602, array-enter (ctrl-shift-enter)
=Shuffle(Indexes), and name it ShuffledIndexes. Finally, into F3:F602,
array-enter =INDEX(NameList,ShuffledIndexes)

I mention this in part because PopTools's Shuffle command draws without
replacement, a handy thing to have. It has a lot of other excellent
stuff, and it's free!!!

HTH
Dave Braden

Stephen Larivee wrote:
I have a list of 600 names. I would like to generate a random number
between 1 and 600 for each person but not have any repeating numbers. So
far I have used
=rand()*600
This give me the correct number range but many of the numbers repeat.

Can I accomplish what I want to do?



--
Please keep response(s) solely within this thread.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unique RANDOM NUMBERS within specified range Matt D Francis Excel Worksheet Functions 5 July 15th 08 08:04 PM
random numbers Randi R Excel Discussion (Misc queries) 3 March 12th 06 08:21 PM
Generate random numberes using reference to the other cell. ramana Excel Worksheet Functions 7 October 31st 05 07:09 AM
Non-random numbers generated by excel's data analysis random gener Harlan Grove Excel Discussion (Misc queries) 2 September 13th 05 04:06 PM
generating Unique ID numbers for students Maltenrazer Excel Worksheet Functions 2 November 6th 04 12:32 AM


All times are GMT +1. The time now is 12:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"