Random Pick in Excel: How to Select Random Names or Data
In this article
To perform a random pick in Excel, the fastest method is to combine the INDEX function with the RANDBETWEEN function. For example, if your list is in cells A1 to A10, the formula =INDEX(A1:A10, RANDBETWEEN(1, 10)) will instantly select one random item from that range. This technique allows you to automate giveaways, select random audit samples, or assign tasks without bias.
What You'll Need
- Microsoft Excel (works in Office 365, Excel 2021, 2019, 2016, and Excel Online).
- A dataset or list of items (names, ID numbers, or product codes) organized in a single column or row.
- Basic knowledge of how to enter a formula into a cell.
Step-by-Step
Method 1: Picking One Single Item (The Classic Method)
This method is ideal for picking one winner from a list. It uses a combination of two functions: INDEX (which retrieves a value at a specific position) and RANDBETWEEN (which generates a random number between two limits).
- Prepare your list: Ensure your items are in a continuous column. For this example, let's assume your names are in cells A2 through A51 (50 names total).
- Select the output cell: Click on the empty cell where you want the random result to appear.
- Enter the formula: Type the following formula:
=INDEX(A2:A51, RANDBETWEEN(1, 50)). - Breakdown of the formula:
A2:A51: This is the range containing your data.RANDBETWEEN(1, 50): This tells Excel to pick a random whole number between 1 and 50.INDEX: This takes that random number and pulls the corresponding name from the list.
- Press Enter: Excel will now display one random name from your list.
Method 2: Picking Multiple Unique Items (The Modern Method)
If you need to pick three winners instead of one, using RANDBETWEEN multiple times might result in the same person being picked twice. To avoid duplicates, use the RANDARRAY and SORTBY functions available in Microsoft 365.
- Identify your range: Assume your list of 50 names is in A2:A51.
- Enter the dynamic formula: In an empty cell, type:
=INDEX(SORTBY(A2:A51, RANDARRAY(50)), SEQUENCE(3)). - Understand the logic:
RANDARRAY(50): Creates a list of 50 random decimals.SORTBY(A2:A51, ...): This randomly shuffles your original list based on those decimals.SEQUENCE(3): This tells Excel to return the first 3 items from the newly shuffled list.
- Press Enter: Excel will automatically "spill" the results into three separate cells, providing three unique random picks.
Method 3: The Manual "Helper Column" Method
If you are using an older version of Excel that doesn't support RANDARRAY, the helper column is the most reliable way to pick multiple unique items.
- Create a helper column: In the column next to your names (Column B), type
=RAND()in cell B2. - Fill the formula down: Click the bottom-right corner of cell B2 and drag it down to B51. Every name now has a random decimal number next to it.
- Sort the data: Select both columns (A and B). Go to the Data tab and click Sort. Sort by Column B (Smallest to Largest or Largest to Smallest).
- Pick from the top: Because the list is now randomly sorted, the first 3, 5, or 10 names at the top of the list are your random picks.
Common Mistakes
- Incorrect Range Counts: A common error is using
RANDBETWEEN(1, 50)when the list only has 40 items. This will result in a#REF!error because Excel is trying to find a 50th item that doesn't exist. Always ensure the second number in RANDBETWEEN matches the total count of your items. - Forgetting the "Volatile" Nature of Randoms: The
RAND()andRANDBETWEEN()functions are volatile. This means every time you type in any cell, delete a row, or press F9, the random pick will change. If you need to "freeze" the winner, you must copy the result and use Paste Special > Values. - Including Headers in the Range: If your list has a header (e.g., "Employee Name" in A1) and your range is A1:A51, there is a chance Excel will pick the header as the winner. Always start your range at the first actual data point (e.g., A2).
- Using RANDBETWEEN for Multiple Picks: As mentioned, using
=INDEX(A2:A51, RANDBETWEEN(1, 50))in three different cells can result in the same name appearing twice. Use Method 2 or 3 for unique selections.
Tips
- Force a Re-roll: If you want to pick a new random item without changing any data, press the F9 key on your keyboard. This forces Excel to recalculate all volatile functions.
- Naming Your Range: To make formulas easier to read, highlight your list (A2:A51), click in the Name Box (top left, next to the formula bar), and type "MyList". Now your formula becomes
=INDEX(MyList, RANDBETWEEN(1, 50)). - Using Tables: Convert your list into an official Excel Table (Ctrl + T). When you add new names to the bottom of a table, the table expands automatically. If you use table references (e.g.,
Table1[Names]), you won't have to manually update the range in your formula every time the list grows. - Combining with VLOOKUP: If you have a list of IDs and want to pick a random ID and then find that person's email address, wrap your random pick inside a VLOOKUP function.
Troubleshooting
If your random pick isn't working as expected, check these common issues in order:
- The result keeps changing: This is normal behavior for RAND functions. To stop this, select the cell with the result, press
Ctrl + Cto copy, right-click the cell, and select the Values icon (123) under Paste Options. This converts the formula into a static piece of text. - #VALUE! or #REF! Error: Check your range. If your list is in A2:A10, but your formula says
RANDBETWEEN(1, 11), you will get a #REF! error. Ensure the number of items matches the RANDBETWEEN limits. - Formula shows as text: If you see
=INDEX(...)in the cell instead of a name, the cell is likely formatted as "Text". Change the cell format to "General" via the Home tab, then click into the formula bar and press Enter. - #NAME? Error: This usually happens if you misspelled a function (e.g.,
RNDBETWEENinstead ofRANDBETWEEN) or if you are using a function likeRANDARRAYin an older version of Excel that does not support it. If you are on Excel 2016 or 2019, switch to the Helper Column method.
Frequently Asked Questions
Can I pick multiple random items without duplicates?
Yes. The best way is to use the SORTBY and RANDARRAY functions in Microsoft 365, or create a helper column with =RAND() and sort the list manually. This ensures each item is only selected once.
Does Excel's random pick truly provide a fair chance?
For most business and casual purposes, yes. Excel uses a pseudo-random number generator. While not suitable for high-stakes cryptographic security, it is perfectly adequate for giveaways, sampling, and randomizing lists.
How do I pick a random number between two specific values?
Use the =RANDBETWEEN(bottom, top) function. For example, =RANDBETWEEN(100, 999) will give you a random three-digit number between 100 and 999 inclusive.
Can I pick a random cell from a different sheet?
Yes. When selecting the range for the INDEX function, simply click over to the other sheet and highlight the cells. The formula will look like =INDEX(Sheet2!A2:A50, RANDBETWEEN(1, 49)).
How do I pick a random item from a horizontal row instead of a column?
The INDEX function works for both. If your data is in cells A2 through Z2, use =INDEX(A2:Z2, 1, RANDBETWEEN(1, 26)). The "1" tells Excel to stay in the first row of that range, while the RANDBETWEEN picks the random column.
Is there a way to pick a random item based on a condition?
Yes, but it is more complex. You would typically use the FILTER function to create a smaller list of items that meet your criteria, and then apply the INDEX(..., RANDBETWEEN(...)) logic to that filtered list.