Results 1 to 3 of 3

20060125, 14:46 #1
 Join Date
 Jan 2001
 Posts
 1,119
 Thanks
 0
 Thanked 0 Times in 0 Posts
Directions to do Random Sampling (2003)
I have the following directions to do a Random Sampling but can't figure out how to proceed from my directions:
Say you have dates (or some number field) in A1:A1000
In B1, enter =RAND()
Fill down by double clicking the fill grip in the lower right corner of B1
Sort on Column B
Select and copy the top n cells in Column A (where do I copy it)
Each time the sheet is recalculated (sorted), the random numbers will change
I have a spreadsheet where I would like to do a random sampling but can't figure out these directions. Do I need a column that is a number? If so, can I create a column of numbers from 1 to how many rows? How do you recalculate? As usual I write down directions and then can't figure out what I did. Can anyone explain how to get a random sampling from the above directions or if there is a better way, I would be grateful for any help provided.
Thanks

20060125, 15:13 #2
 Join Date
 Mar 2002
 Posts
 84,353
 Thanks
 0
 Thanked 30 Times in 30 Posts
Re: Directions to do Random Sampling (2003)
I assume that you want to extract a random sample from some existing data. These data must be in a table format, i.e. each row is a "record" of data. You want to draw some rows at random from the table.
 <LI>Let's say your data are in A1:F100, with column headings in row 1, so the actual data are in rows 2 through 100. Cells A1 through F1 should all be filled.
<LI>You'll need to have at least two empty columns to the right of the data table; if necessary insert new columns.
<LI>Enter a new column header, say Random in G1 (G is the column immediately to the right of the data; it should be blank)
<LI>Enter the formula =RAND() in G2.
<LI>Fill down this formula to G100 (row 100 is the last row of the data table).
<LI>Click in cell G1, then click the Sort Ascending button on the Standard toolbar (A above Z with a downwards arrow).
<LI>The rows of the data table will be sorted in a completely random order.
<LI>If you want to draw a sample of 10 rows, select the column headers with the first 10 data rows (i.e. rows 1 through 11 in total), copy to the clipboard, and paste where you need them.

20060125, 15:19 #3
 Join Date
 Jan 2001
 Posts
 1,119
 Thanks
 0
 Thanked 0 Times in 0 Posts
Re: Directions to do Random Sampling (2003)
Thank you for the explanation.
I will try this.