In cell A I have a list of 40 values and I am trying to pull a random
sample. In column B I put Rand() and in Column C I put
=INDEX(A$1:A$200,RANK(B1,B$1:B$200))
Assuming values to be sampled are in A1:A40
In B1: =RAND()
First, B1 has to be copied down to B40
And then in C1, place: =INDEX(A$1:A$40,RANK(B1,B$1:B$40))
C1 will then return a random sample from A1:A40,
which is re-generable via pressing the F9 key
You could of course copy C1 down by as many rows as desired to return more
random samples (non repeating), or till C40 for the maximum scramble of the
entire lot of source values in A1:A40
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---