View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Alan
 
Posts: n/a
Default How do I pull a random sample of people from a list in excel?

"PM" wrote in message


I am trying to pull 600 contact records from a list in excel of over
50,000. I think a random sample will work fine. There are 2
demographic markers that I have pulled counts on for the entire
database. I need to pull a similar ratio of contacts in my sample
of 600, but I believe if I pull a random sample it will work out.
Any ideas on how to do this?


Hi,

This is the simplest way I know:

If you have your data in columns B1 to D50000 then do the following:

Enter the following into A1 and copy down to A50000:

=RAND()

Now in E1 enter:

=VLOOKUP(SMALL(A$1:A$50000,ROW()),A$1:D$50000,Col_ Offset,FALSE)

Where Col_Offset would be '2' to return the data in column B, '3' to
return the data in column C etc..

Copy E1 down to E600 (to get a sample of 600 items).

HTH,

Alan.

--
The views expressed are my own, and not those of my employer or anyone
else associated with me.

My current valid email address is:



This is valid as is. It is not munged, or altered at all.

It will be valid for AT LEAST one month from the date of this post.

If you are trying to contact me after that time,
it MAY still be valid, but may also have been
deactivated due to spam. If so, and you want
to contact me by email, try searching for a
more recent post by me to find my current
email address