How to Sort Data Inside a Word Table
🔍 WiseChecker

How to Sort Data Inside a Word Table

You have a table in Word with rows of names, dates, or numbers that are not in the order you need. Manually moving each row is slow and error-prone. Word includes a built-in Sort feature that rearranges rows alphabetically, numerically, or by date in ascending or descending order. This article explains how to use the Sort dialog, set primary and secondary sort criteria, and avoid common sorting mistakes.

Key Takeaways: Sorting a Table in Word

  • Home > Paragraph > Sort (AZ icon with arrow): Opens the Sort dialog for the active table.
  • Sort by dropdown: Choose the column that determines the primary sort order.
  • Type dropdown: Select Text, Number, or Date so Word interprets the values correctly.
  • Header row option: Prevents the first row from being moved during sorting.

What the Word Table Sort Feature Does and Its Prerequisites

The Sort feature in Word works on any table that has more than one row. It rearranges entire rows based on the content of one or more columns. You can sort by a single column, or by a primary and secondary column for finer control. The feature supports three data types: Text, Number, and Date. Word uses the system locale to determine date formats and alphabetical order.

Before you sort, ensure your table has consistent data in each column. A column that mixes text and numbers may not sort as expected. If your table has a header row, the Sort dialog can exclude it from the sort operation. You must also have the table selected or have the cursor inside it. No special add-ins are required — the Sort button is part of the standard Word installation.

When to Use Single-Column vs Multi-Column Sorting

Single-column sorting is sufficient when only one column determines the order, such as sorting a list of names alphabetically. Multi-column sorting is useful when you have repeated values in the primary column. For example, if you sort by Department first and then by Last Name, employees in the same department appear together and are ordered alphabetically within that group.

Steps to Sort Rows in a Word Table

  1. Place the cursor anywhere inside the table
    Click any cell in the table you want to sort. You do not need to select all cells. Word recognizes the table boundaries automatically.
  2. Open the Sort dialog
    Go to the Home tab. In the Paragraph group, click the Sort button. The icon shows the letters AZ with a downward arrow. The Sort dialog appears.
  3. Choose whether your table has a header row
    At the bottom of the Sort dialog, select Header row or No header row. If you select Header row, the first row is excluded from sorting and remains at the top. If you select No header row, every row including the first is sorted.
  4. Set the primary sort column and type
    In the Sort by dropdown, pick the column you want to sort by. The dropdown lists column names (Column 1, Column 2, etc.) or header text if you selected Header row. In the Type dropdown, choose Text, Number, or Date to match the data in that column. Select Ascending or Descending for the sort order.
  5. Add a secondary sort column (optional)
    Click the Then by dropdown and repeat the column, type, and order selection. This secondary sort applies only to rows with identical values in the primary column. You can add a third sort level by clicking Then by again.
  6. Apply the sort
    Click OK. Word rearranges the rows according to your settings. If the result is incorrect, press Ctrl+Z immediately to undo the sort.

Common Sorting Mistakes and How to Avoid Them

Sorting Mixes Up Data From Different Rows

This usually happens when you select only a portion of the table before sorting. Word sorts only the selected cells, leaving the rest of the table unchanged. To avoid this, place the cursor inside the table and use the Sort button without selecting any cells. Word then sorts the entire table.

Numbers Are Sorted as Text

If a column contains numbers but Word sorts them alphabetically (for example, 1, 10, 2, 20), the Type dropdown is set to Text. Open the Sort dialog again and change the Type to Number. This forces Word to compare numeric values rather than character codes.

Dates Are Not Sorted Correctly

Word relies on the system date format to interpret dates. If your dates are written in a format that does not match your Windows region settings, sorting may fail. Ensure all dates in the column use the same format, such as MM/DD/YYYY or DD/MM/YYYY, and that format matches your system locale. Then set the Type to Date.

Header Row Moves Into the Sorted Data

If the header row appears in the middle of the table after sorting, you selected No header row in the Sort dialog. Repeat the sort and choose Header row. The first row will stay at the top.

Sorting Options: Word Desktop vs Word Online

Item Word Desktop (Windows) Word Online
Sort button location Home > Paragraph > Sort (AZ icon) Not available in the ribbon
Multi-column sort support Up to three levels (Sort by, Then by) Not supported
Data type detection Manual selection (Text, Number, Date) Not supported
Header row exclusion Radio button in Sort dialog Not supported
Undo after sort Ctrl+Z works Ctrl+Z works if sort was performed in Desktop app

Word Online does not have a Sort button. To sort a table in a document opened in a browser, you must open the file in the Word desktop app. After sorting, save the file, and the sorted order appears in Word Online.

Sorting a Single Column Without Affecting Other Columns

Word does not support sorting a single column independently while keeping other columns in their original order. The Sort feature always moves entire rows. If you need to rearrange only one column, you must copy that column to a separate table, sort it there, and then paste the sorted values back. This manual method is the only way to achieve column-only sorting in Word.

You can now sort any Word table using the Sort dialog on the Home tab. Start with a single-column sort to verify the data types are correct. For tables with repeating values, add a secondary sort level using the Then by dropdown. A useful tip: before sorting a large table, make a backup copy by selecting the entire table, copying it, and pasting it onto a blank page. If the sort produces unexpected results, you can restore the original order from the backup.