Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Randomly Select from a List in Excel

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To randomly select one or more items from a list in Excel, you can use built-in functions like RAND, RANDBETWEEN, and INDEX without add-ins or macros. This method ensures unbiased, repeatable selection for tasks like lotteries, team assignments, or sampling. No special tools are required beyond standard Excel versions from 2010 onward.

What You'll Need

  • A list of items in a single column or row (e.g., names, product codes, tasks)
  • Microsoft Excel 2010 or later (Windows or Mac)
  • Basic familiarity with entering formulas into cells

Step-by-Step

  1. Enter your list of items into a single column (e.g., A2:A20). Leave the first row (A1) as a header if desired, but ensure your data starts in row 2 or lower to avoid formula errors.
  2. In the cell next to the first item (e.g., B2), type the formula =RAND(). This generates a random decimal between 0 and 1.
  3. Click on cell B2 to select it, then drag the fill handle (small square at the bottom-right corner of the cell) down to copy the formula to every row that has an item in column A. This assigns a unique random number to each item.
  4. With all random numbers generated, select the entire range of random values (e.g., B2:B20), then press Ctrl+C to copy them.
  5. Right-click on the same range (B2:B20), choose "Paste Special", then select "Values" and click OK. This converts the formulas into static numbers so they won’t recalculate when you make other changes.
  6. Select the entire range including both your original list and the random values (e.g., A1:B20), then go to the Data tab on the ribbon and click "Sort".
  7. In the Sort dialog box, under "Sort by", choose the column with the random numbers (e.g., Column B). Under "Order", select "Smallest to Largest". Click OK. Your list is now randomly shuffled.
  8. To select one item, simply pick the first entry in the sorted list (e.g., A2). To select multiple items, take the top N entries (e.g., A2:A5 for five random picks).
  9. If you need to reshuffle, delete the static random values in column B, re-enter =RAND() in B2, drag it down again, and repeat steps 5 through 7.

Common Mistakes

  • Not converting RAND() results to values before sorting, which causes the list to reshuffle during sorting and breaks the randomness.
  • Starting the formula in row 1 when the list begins in row 2, leading to a mismatch between item count and random values.
  • Sorting only the column with items and ignoring the random numbers, which leaves the list unshuffled.
  • Using RANDBETWEEN(1, N) directly on the list without INDEX, which doesn’t work for text lists — RANDBETWEEN only returns numbers.
  • Forgetting to lock the array reference when using INDEX with RANDBETWEEN in advanced methods, causing incorrect selections when copying formulas.

Tips

  • Use a separate worksheet or section to generate random selections so your original list remains untouched and editable.
  • For large lists (100+ items), use Excel’s Table feature (Insert > Table) to auto-expand formulas and make sorting more reliable.
  • If you need to pick without replacement (no duplicates), this method ensures uniqueness since each item gets one random number.
  • To pick multiple items without manual sorting, use the formula =INDEX(A:A,RANDBETWEEN(1,COUNTA(A:A))) — but be aware this can return duplicates if used repeatedly.
  • Press F9 to force Excel to recalculate all RAND() values instantly — useful if you want new random selections without re-entering formulas.
  • For audit trails, copy the sorted list to a new sheet and label it with a timestamp to document which selection was used when.

Troubleshooting

  • Random numbers aren’t changing: Excel may be set to Manual Calculation. Go to Formulas > Calculation Options and select Automatic. Press F9 to force a recalculation.
  • Sort option is grayed out: Make sure you’ve selected a contiguous range that includes both your list and the random numbers. If your data is in a Table, ensure you’re selecting the entire table or use the Table’s built-in sort.
  • Wrong item is selected after sorting: Double-check that you sorted by the random number column, not the original list. Also verify no blank rows exist between items — gaps can cause sorting to treat sections as separate lists.
  • Formula shows #REF! or #VALUE!: You may have deleted or moved a cell referenced in a formula. Re-enter =RAND() in the first cell of the random column and drag down again.
  • Selections look non-random: Human perception often misjudges randomness. Run the process 5–10 times and check if the distribution of selected items feels biased — true randomness includes clusters and gaps.

Frequently Asked Questions

Can I randomly select multiple items without sorting the whole list?

Yes, use the formula =INDEX(A:A,RANDBETWEEN(1,COUNTA(A:A))) in a new cell. Each time you press F9, it picks a new random item from column A. Copy this formula to other cells to get multiple picks, but duplicates are possible.

Does this work with names that have spaces or special characters?

Yes. Excel’s RAND and INDEX functions handle any text, including names with accents, hyphens, or symbols. Just ensure the data is entered as plain text, not formatted as a date or number.

Can I use this on Excel for the Web or mobile?

Yes, all steps work in Excel for the Web and Excel mobile apps. The Data > Sort option is available in both. RAND() and INDEX() are fully supported.

What if my list has blank cells?

Blank cells in your list will still get a random number and be included in the sort. To avoid this, filter out blanks first: select your list, go to Data > Filter, click the dropdown in column A, and uncheck "(Blank)" before applying the random numbers.

Can I make the selection permanent so it doesn’t change?

Yes. After sorting, copy the entire shuffled list (both columns), then paste as values over itself. This removes all formulas and locks the selection.

Is there a way to select weighted random items (e.g., some items more likely than others)?

This method gives equal probability. For weighted selection, you need a helper column with cumulative probabilities and VLOOKUP or XLOOKUP — it’s more complex and requires manual setup of weights.