Random selection of items in excel - no VBA
I've just found an easy way to randomly (pseudo!) get, on demand, any subset of given items. Their type does not matter.
Suppose we want to get two random unique integers between 1 and 5. Starting from A1, the formulas are (column 'C' is empty):
[tt] A B C D
mixer list
=RAND() 1 =B2
=RAND() 2 =B3
=RAND() 3
=RAND() 4
=RAND() 5[/tt]
Now, sorting randoms in column 'A' will also change column 'B'. Formulas in column 'D' will still refer to B2 and B3, but the result will change. As RAND() function is volatile. each recalculation changes values in column A, but, as we refer to column 'B' the output changes only after sorting, which is under our control.
combo
I've just found an easy way to randomly (pseudo!) get, on demand, any subset of given items. Their type does not matter.
Suppose we want to get two random unique integers between 1 and 5. Starting from A1, the formulas are (column 'C' is empty):
[tt] A B C D
mixer list
=RAND() 1 =B2
=RAND() 2 =B3
=RAND() 3
=RAND() 4
=RAND() 5[/tt]
Now, sorting randoms in column 'A' will also change column 'B'. Formulas in column 'D' will still refer to B2 and B3, but the result will change. As RAND() function is volatile. each recalculation changes values in column A, but, as we refer to column 'B' the output changes only after sorting, which is under our control.
combo