Skip to main content

How to shuffle rows/columns/a range of cells randomly in Excel?

Author: Sun Last Modified: 2024-07-05

When working with data in Microsoft Excel, there are times when you might need to randomize the order of rows. This can be useful in many situations, such as creating random samples for statistical analysis, shuffling quiz questions, or just ensuring a random distribution of data. This article will guide you through several methods to randomize rows in Excel efficiently, ensuring you can adapt these techniques to various needs.


Shuffle rows/a column list of data with helper column

1. Select a list of cells next to you range, for instance, D1: D8, and then type this formula =RAND(), see screenshot:

doc shuffle rows 3

2. Then press Ctrl + Enter. Now you can see there is a list of random data displayed.

doc shuffle rows 4

3. Now you can go to Data tab, and select Sort smallest to largest or Sort largest to smallest as you need. See screenshot:

doc shuffle rows 5

4. Then there is a popped dialog, and check Expand the selection option. And click Sort.

doc shuffle rows 6

Till now the data range has been shuffled by rows randomly.

doc shuffle rows 7

Then you can remove the formula cells.

doc shuffle rows 2

Tips and Notes:
  1. The Excel RAND function is volatile, which means it generates new random numbers each time the worksheet recalculates. If you're not satisfied with the initial randomization, you can re-sort the list multiple times until you achieve the desired order.
  2. To stop the random numbers from changing every time you modify the worksheet, you can copy the cells containing the RAND formula and use the Paste Special feature to paste them as values.

Shuffle rows/columns/a range of cells randomly with Kutools for Excel

With our revolutionary Sort Range Randomly utility of Kutools for Excel, you can effortlessly shuffle your data to suit your needs. Whether you're looking to randomize entire rows, columns, or every cell within a range, Kutools makes it simple. Need to pick random cells, columns, or rows from your dataset? We've got that covered too! Simplify complex tasks, enhance your productivity, and make data management a breeze with Kutools for Excel.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Enhanced with AI capabilities, Kutools automates tasks with precision, making data management effortless. Read More...         Free trial...

After installing Kutools for Excel, please do as below:(Free Download Kutools for Excel Now!)

1. Select the range cells you want to shuffle randomly, and click Kutools > Range > Sort / Select Range Randomly. See screenshot:

doc shuffle rows 16

2. Then in the Sort /Select Range Randomly dialog, under Sort tab, please select the option you need.

doc shuffle rows 10

3. Then click Ok or Apply.

Sort by entire rows

doc shuffle rows 11

Sort by entire columns

doc shuffle rows 8

Sort cells in the range

doc shuffle rows 12

Sort cells in each row

doc shuffle rows 13

Sort cells in each column

doc shuffle rows 14

With Kutools for Excel’s Sort Range Randomly utility, you can select cells randomly in a range.

doc shuffle rows 15

Click here to know more about Sort Range Randomly utility.

This article has detailed various methods for randomizing rows in Microsoft Excel, essential for tasks such as creating random samples or shuffling data. It covers simple techniques using a helper column and more advanced strategies with Kutools for Excel, accommodating different user levels and ensuring effective data manipulation for diverse needs. If you're interested in exploring more Excel tips and tricks, our website offers thousands of tutorials. Please click here to access them.


Demo: Select Or Sort Cells Randomlly

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Comments (10)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I do not have an 'upload attachment' option below the message board.
Only 'rate this post', 5 stars to choose from, followed by 'Reset'.
This comment was minimized by the moderator on the site
Hi, Andrew Arnold, the Upload Atatchment option will appear when you login.
This comment was minimized by the moderator on the site
Sunny,
Its not a table I am trying to shuffle rows in, It's about 30 rows of an excel spreadsheet.
I added a column to the right, used the RAND() formula and :
1. it would only offer up two or three random numbers at a time instead of the whole column
2. after re-entering the RAND() function a few times to get all the rows I want to shuffle to have assigned random numbers, the rows will not shuffle. THis is when the message about a table appears, which I don't understand.
This comment was minimized by the moderator on the site
Hi, andrew arnold, I still not understand your question. Select 30 cells in the helper column (the column you add at right), then go to the formula bar to type =RAND(), press Enter key, then the formula RAND() will be inserted at 30 cells in the helper column at once. Then go to sort this helper column to make 30 rows shuffle randomly.
This comment was minimized by the moderator on the site
i am trying to send you a screen shot but this medium wont let me,.
This comment was minimized by the moderator on the site
Hi, andrew arnold, click the Upload Attachment below the message board, you can upload screen shot or a file.
This comment was minimized by the moderator on the site
Trying to shuffle rows, it will not allow me to.
Says something about a table.
This comment was minimized by the moderator on the site
Hi, I have tried methods above again, both of them support shuffle rows in table. Please see the gif picture below:
This comment was minimized by the moderator on the site
shuffle row data
This comment was minimized by the moderator on the site
This is great! Thanks!
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations