Hi all,
I have a spreadsheet with a colum of 200 I.D. numbers.
01A
01F
02C
02H
etc.
Each week I have to randomly select 10 of the 200.
Is there an Excel function that will do this for me?
Not really; I have one way of doing it which will probably only prove
that I need more sleep, but it does seem to work...
Can you stick a blank column in front of your ID numbers, and fill
that with =RAND() formulas?
Let's say that your RAND formulas are in column A, and your ID numbers
are now in column B.
Now enter the numbers 1 to 10 in somewhere. I've put them in D1 to
D10.
You can now put the following formula in E1 and copy it down to E10:
=VLOOKUP(LARGE($A$1:$A$200,D1),$A$1:$B$200,2,FALSE)
The formula in E1 will look up the largest random number through its
LARGE function. The one in E2 will look up the second largest one and
so on. The VLookup will return the ID code that is in the next column.
Accordingly all you need to do is recalculate the sheet, the RAND
functions will generate a whole new series of random numbers, and your
lookup formulas will select the top 10.
And now, I'm off to bed. 8^>