Excel has no single "shuffle" button, but you can randomize a list of numbers in seconds using a helper column and the RAND or RANDARRAY function. This guide covers ten reliable methods, from a simple sort-by-random-number trick to a dynamic array formula that reshuffles on demand. It is written for anyone who needs to randomize order for sampling, drawing, testing, or fair assignment — no add-ins or macros required.
1. The RAND Helper Column and Sort
In the column next to your numbers, enter =RAND() and fill it down to match the list length. Select both columns, then go to Data > Sort, choose the RAND column as the sort key, and click OK. Delete the helper column afterward. This is the most universal method and works in every version of Excel, including Excel for the web.
2. RANDARRAY for a One-Cell Shuffle
If you have Microsoft 365 or Excel 2021, =SORTBY(A2:A11, RANDARRAY(ROWS(A2:A11))) returns your list in a random order in a single formula. Change the range to match your data. Because RANDARRAY is volatile, the order refreshes whenever the sheet recalculates — press F9 to reshuffle deliberately.
3. RANDBETWEEN as a Sort Key
=RANDBETWEEN(1,1000000) generates a random integer you can sort by, just like RAND. The advantage is that duplicate values are far less likely than with RAND's long decimals, so ties are rare. Use it when you want a stable-looking integer key you can eyeball before sorting.
4. SORTBY with a Random Array
=SORTBY(A2:A11, RANDARRAY(10)) is a compact alternative to the RANDARRAY method above. The second argument must match the number of rows in your list. It is ideal for a one-off shuffle you can copy as values afterward. Paste as values to freeze the order before sharing the file.
5. INDEX and RANK for a Non-Volatile Shuffle
Create a helper column of =RAND(), then use =INDEX($A$2:$A$11, RANK(B2, $B$2:$B$11)) in a third column. This maps each random rank back to a list position. The result stays put until you recalculate, which is useful when you need the order to survive a save-and-reopen.
6. Shuffle with Power Query
Load your list into Power Query (Data > From Table/Range), then add an index column and a custom column with Number.Random(). Sort by the random column and load the result back to a sheet. Power Query is the right choice when you shuffle the same list repeatedly and want a repeatable, refreshable process.
7. The RAND() + Paste Values Freeze
After any formula-based shuffle, copy the randomized column and use Paste Special > Values to replace the formulas with static numbers. This locks the order so it will not change when someone edits the sheet. Do this before emailing the file or printing it — otherwise the recipient may see a different order.
8. Shuffle a Numbered List with a Seed
For a reproducible shuffle, put a fixed number in a cell and use =RAND()*$D$1 as your sort key, where D1 holds your seed. Sorting by that key gives the same order every time you rebuild the sheet. This is handy for audits or classroom draws where you need to prove the order was not cherry-picked.
9. Use the Analysis ToolPak Random Number Generator
Enable the Analysis ToolPak via File > Options > Add-ins, then use Data Analysis > Random Number Generation. Choose "Uniform" and set the range to match your list length, then sort by the generated column. It is clunkier than RAND but produces integer keys without formulas lingering in the sheet.
10. Shuffle in Google Sheets or Excel for the Web
Google Sheets supports =SORT(A2:A11, RANDARRAY(10), TRUE) and a RAND helper column the same way. Excel for the web supports RAND and RANDARRAY but not Power Query or the Analysis ToolPak. If you are on the web version, stick to methods 1–4 and paste as values to freeze the result.
How to Choose
Pick based on your Excel version and whether the order must stay fixed. If you have Microsoft 365 or Excel 2021, RANDARRAY or SORTBY gives you a one-formula shuffle with no cleanup. On older versions, the RAND helper column plus Data > Sort is the most reliable path. Choose Power Query when you shuffle the same list on a schedule, and choose a seeded RAND when you need the same order reproducible. Always paste as values before sharing the file, because RAND and RANDARRAY recalculate and will silently reorder your list.
Frequently Asked Questions
Why does my shuffled list keep changing?
RAND, RANDBETWEEN, and RANDARRAY are volatile functions — they recalculate whenever the sheet changes or you press F9. Copy the result and use Paste Special > Values to freeze it.
Can I shuffle without a helper column?
Yes, in Microsoft 365 or Excel 2021 use =SORTBY(A2:A11, RANDARRAY(ROWS(A2:A11))). Older versions need a helper column.
Does sorting by RAND give a truly random order?
It gives a pseudorandom order good enough for draws, sampling, and testing. For cryptographic or regulated randomness, use a dedicated random-number tool instead.
Why do I get duplicate numbers after shuffling?
Duplicates usually mean RAND ties or that your source list already had repeats. Use RANDBETWEEN with a wide range to reduce ties, and check the source column for duplicates first.
Can I shuffle in Excel for the web?
Yes, with RAND or RANDARRAY and Data > Sort. Power Query and the Analysis ToolPak are not available in the web version.
Final Thoughts
The RAND helper column plus Data > Sort is the safest universal method, while SORTBY with RANDARRAY is the fastest on modern Excel. Whichever you use, paste as values before sharing so the order stays put — and if you need the same shuffle twice, use a seeded RAND key.