To sort a table in Word, click anywhere in the table, go to the Table Layout tab (called Layout in older versions) and select Sort. Choose the column to sort by, pick Text, Number or Date, choose Ascending or Descending, tick Header row if your table has titles in the first row, and select OK. Word moves whole rows, so the data in each row stays together.
Applies to: Word for Microsoft 365, Word 2024, 2021, 2019 and 2016 on Windows and Mac.

Sort a table in Word
- Click inside the table. You don’t need to select it.
- Go to Table Layout > Sort (in the Data group). Word selects the whole table.
- Under My list has, choose Header row if the first row holds column titles. This keeps it at the top and lets you pick columns by name.
- Under Sort by, choose the column.
- Set Type to match the data: Text for names, Number for amounts, Date for dates.
- Choose Ascending (A to Z, smallest to largest, oldest to newest) or Descending.
- Select OK.
Sort by more than one column
Use the Then by boxes to break ties. For example, sort by Last name, then by First name. Word allows up to three levels.
If a column holds names like “Maria Lopez”, Word can sort by the second word:
- Open Sort and select Options.
- Under Separate fields at, choose Other, type a single space, and select OK.
- Under Sort by, pick the name column. In the Using box, choose Word 2.
- Add Then by the same column using Word 1 so people with the same last name sort by first name, and select OK.
Names with a middle name or initial won’t sort correctly this way. For those, split first and last names into separate columns first.
Example: sort a price list from highest to lowest
For a table with columns Item, Category and Price, open Sort, choose Header row, set Sort by to Category (Text, Ascending) and Then by to Price (Number, Descending). Each category is grouped together, with the most expensive item first.
Sort only some rows
Select just the rows you want to sort before opening Sort. Word leaves the other rows where they are. This is useful when the table has a total row at the bottom that should stay last.
Why the Type setting matters
Sorted as Text, numbers go in character order: 1, 10, 100, 2, 20. Sorted as Number, they go 1, 2, 10, 20, 100. Dates sorted as Text go by the first digit rather than the date. Always match the type to the column.
Case-sensitive sorting and other options
Select Options in the Sort dialog to:
- Tick Case sensitive so lowercase and uppercase entries sort separately.
- Choose the Sorting language, which affects the order of accented letters.
- Pick a separator if you’re sorting text rather than a table.
Undo a sort
Press Ctrl+Z (Command+Z on a Mac) straight away. Word has no way to restore the original order later, so if you may need it, add a numbered column before sorting and sort by that column to go back.
Troubleshooting
The header row got sorted into the data
Undo, open Sort again and choose Header row under My list has.
Sort is greyed out or gives an error
The table probably has merged cells or rows with different numbers of columns. Split merged cells with Table Layout > Split Cells, sort, then merge them again. If you’re in Word for the web, select Editing > Open in Desktop App to use the full Sort dialog.
Numbers or dates are in the wrong order
Check that Type is set to Number or Date. Remove currency symbols or text such as “approx.” that stop Word reading the values as numbers.
Blank rows end up at the top
Empty cells sort first in ascending order. Delete blank rows before sorting.
Frequently asked questions
Can I sort a list that isn’t in a table?
Yes. Select the paragraphs and go to Home > Sort (the A-Z button). The details are in alphabetizing in Word.
Can I sort a table horizontally by rows?
No. Word sorts rows only. Copy the table into Excel, sort left to right there, and paste it back.
Can I sort by cell color?
No. Word only sorts by text, numbers and dates. Add a column with a label for each color and sort by that, or sort the data in Excel, which can sort by color.
Does sorting keep cell formatting?
Yes. Shading, bold text and other formatting move with each row.
How do I move the table after sorting?
Drag the four-arrow handle at its top-left corner, or try the other options in moving tables in Word. If you no longer need the grid, you can convert the table to text.
Need more rows before you sort? Here’s how to add a row to a table in Word.

Matt Jacobs has been working as an IT consultant for small businesses since receiving his Master’s degree in 2003. While he still does some consulting work, his primary focus now is on creating technology support content for SupportYourTech.com.
His work can be found on many websites and focuses on topics such as Microsoft Office, Apple devices, Android devices, Photoshop, and more.