Sort the contents of a table

  1. Click inside the table to show Table Tools in the ribbon, and then click Layout > Sort.

    Sort button

    You’ll see the Sort dialog box.

    Sort dialog box

  2. In the dialog box, choose how you’d like to sort the table.

    1. Under Sort by, choose the name of the column you want to sort the table by.

    2. Next to Type, choose if you’d like to sort according to Text, Number, or a Date.

    3. Click next to Ascending or Descending to choose a sort order. The following table is sorted in ascending order.

      Sorted table

  3. When you are finished, click OK.

More options:

  • If the column you’re sorting contains fields of information separated by commas, tabs, or some other character, click next to Using to choose which field to sort by. For example, if the column you’re sorting is Last name, First name, you can choose to sort by Last name or First name. Click the Options button at the bottom of the dialog box to choose the separating character.

  • If you want to have a second level sort, you can enter that information under Then by. The second level sort will only take effect if two or more values in the first column are the same.

  • You can also choose a third level sort, as shown in the following table.

    Third level sort

  • If your table has a header row, be sure to click the Header row box under My list has at the bottom of the dialog box. That way, the top row will not be sorted and will stay at the top.

  • Click Options for additional settings, such as making your sort case sensitive or choosing the sort language.

You can also sort a list that's not in a table.

With Word for the web you can add tables to your document, but to sort the table contents you need to open and edit the document in the desktop version of Word.

Click Edit Document > Edit in Word, or click Open in Word.

Image of Open In Word command in Word Online

Then follow the instructions in Sort the contents of a table.

When you save the document in the desktop version of Word and reopen it in Word for the web, you’ll see the changes you made.

See also

Insert or draw a table

Copy a Word table into Excel

Convert text to a table or a table to text

Use a formula in a Word or Outlook table

Video: Create accessible tables in Word

Expand your Office skills
Explore training
Get new features first
Join Office Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.