Random Sample

  • Thread starter Thread starter Kelly
  • Start date Start date
K

Kelly

Hello all-
I have a list of numbers, 1 through about 9,000 used as a
primary key for a list of names. I need to have a random
sample of 200 names (numbers) generated. Is there a
formula to do this? Without writing a macro? Many thanks
as usual to anyone with any input!!!

Kelly : )
 
Hi

In the empty column alongside your data type =RAND() and fill this down.
Every time the sheet recalculates (or you pres F9) these numbers will
change. You can sort on this column and use the top 200 names.
 
How about (assuming cells to be sampled are all in column A):

=INDIRECT("a"&ROUND(RAND()*8999+1,0))

Then, simply copy that formula for the remaining 199 cells to get you
200 samples.

This formula will produce duplicates from time to time, however, so i
that's a problem then you'll need something else
 
Back
Top