RANDom Selection
Evan Paulus
Okay, so most of us don't have a reason to ever need to generate a random number, which is what the RAND function does. But that may be because you haven't thought of this tricky use.
I like to use the RAND function when I have a list and I want to randomly select one (or five) of the items. Let's say you were having an office gift exchange event and needed to determine who would exchange with who. Believe it or not, the RAND function can help you out.
A | B | |
1 | Employee | Random Number |
---|---|---|
2 | Andy | 0.429115033 |
3 | Josie | 0.198586608 |
4 | Bob | 0.727954957 |
5 | Robert | 0.516482559 |
6 | Angela | 0.642221118 |
7 | Brad | 0.112969844 |
8 | Duane | 0.889096044 |
9 | Eduardo | 0.514488409 |
10 | Edmond | 0.566252014 |
11 | Christina | 0.841090361 |
The RAND function is as simple as an Excel function gets. In each of the cells in column B, you simply enter '=RAND()'. It accepts no parameters whatsoever and will spit out a random number between zero and 1.
IMPORTANT: The RAND function will keep generating new random numbers every time the worksheet recalculates, which it does all the time, unless you do one of two things:
- Preferred Approach: You should copy the values in cells B2 to B11, and paste as values right back in B2 to B11.
- Alternative Approach: You can turn off Automatic calculations so that the worksheet only updates when you tell it to update. Do this by clicking the Formula tab, Calculation Options, then Manual. But remember to turn it off when you no longer want it.
Now that you have a list of ten random numbers, simply sort the list in Ascending order. Do this by highlighting the entire table (from A1 to B11), clicking the Data option, then Sort.
Now you have your gift exchange order. Brad goes first, Josie second, Andy third, and so on.
I use the RAND function more often than you might think. Consider an auditor that needs to randomly select ten accounts to review in a company with 300. Or use it to select the winner of a drawing (the person with the lowest random number wins).