How to generate a random list in Mac Numbers
Yesterday my favorite Youtuber announced that he would randomly pick 5 people in the comment section for the 1000 dollar cash prize. Of course, I left a comment there to try my luck. But I wondered how he would do that. If he doesn’t know coding or use expensive software, can he randomly generate a list using just Numbers on Mac?
I tried it myself. And I can tell you with confidence that it is possible. I will show you the instructions below.
1. How to randomly shuffle a list
Why do I have to randomly shuffle a list first? The overall strategy works as follows. I randomly shuffle a list so that the items on the list appear in a random order. Then I take the first 5 items of that list. Those 5 items are my random selection from the list.
Anyways, I need an extra column for the random shuffle. The column has values generated by the RAND function in Numbers. Then I sort the list by those random values.
In order to sort my list, I click the Organize button. Click the Sort tab. Select column D (My Random column). Click the Sort Now button.
2. How to generate a random selection from a list
Once I complete the steps above, I have a list of names in random order. Now I just have to grab the first 5 names. Those 5 names are randomly chosen in my list of 9 names. See the screenshot below.
3. Force Mac Numbers to recalculate the random value generating function
Let’s say I’m not happy with the first 5 randomly selected names. I want to do it again. How do I force Mac Numbers to recalculate the random values? There is a simple trick for that. If I have a checkbox in my table, any change to that checkbox will trigger the random function to recalculate. The change means tick or untick the checkbox.
Follow the steps below to turn a cell into a checkbox:
- Select the cell
- Click the Format button
- Click the Cell tab
- Select Checkbox under Data Format