Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Sorting by Headings.

Sorting by Headings

Written by Allen Wyatt (last updated May 27, 2023)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021


1

A useful trick you can use when developing some types of documents is the ability to sort the various parts of the document based on the headings you use. For instance, you can sort the document based on first-level headings (paragraphs that use the Heading 1 style) by following these steps:

  1. Switch to Outline view. (Either click the Outline view button on the status bar or go to the View tab of the Ribbon and select Outline in the Views group.)
  2. Using the controls on the Outlining tab of the ribbon, collapse the headings so that only the first-level headings are shown. (This step is not strictly necessary, but does make the screen a bit more readable.)
  3. Place the cursor at the beginning of the first heading and press Ctrl+Shift+End to select everything through the end of the document.
  4. Display the Home tab of the ribbon.
  5. Click the Sort tool in the Paragraph group. Word displays the Sort Text dialog box. (See Figure 1.)
  6. Figure 1. The Sort Text dialog box.

  7. If the first "Sort By" drop-down list is set to anything other than "Headings," change the option to Headings. (In some older versions of Word, "Headings" may not be an option. In those versions, simply choose the default—"Paragraphs.")
  8. Click on OK to dismiss the dialog box and perform the sort.

Had you skipped the first two steps and performed the sort in any view besides Outline view, every paragraph would have been sorted alphabetically and therefore rearranged so that subordinate paragraphs would be separated from their headings. In other words, you would have a mess. However, in Outline view, the highest-level headings are sorted, bringing along the subordinate heading levels and body text.

If you wanted to sort by Heading 2 paragraphs, you should also use Outline view, but you would have to first select all the Heading 2 paragraphs subordinate to a particular Heading 1 paragraph and then sort. You will get the same results regardless of how many heading levels that you show on the Outline tab of the ribbon.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (11238) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Word here: Sorting by Headings.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Creating Unnumbered Endnotes

Endnotes are indispensable in some types of writing. You may want to create endnotes, however, that don't follow the ...

Discover More

Setting a Default Document Format

Word allows you to save your documents in a variety of different formats. You can specify the format when you actually ...

Discover More

Changing Currency Formatting for a Single Workbook

Currency is formatted differently in different corners of the world. Most formatting uses periods and commas to indicate ...

Discover More

The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word 2013. Spend more time working and less time trying to figure it all out! Check out Word 2013 For Dummies today!

More WordTips (ribbon)

Sorting by Highlighting

The sorting capabilities of Word are quite handy and easy to use. What if you want to sort by something Word doesn't sort ...

Discover More

Controlling Sorting Order

When you sort information either in a table or the body of you document, Word follows a very specific set of rules to do ...

Discover More

Changing Paragraph Order

Want a quick way to rearrange entire paragraphs of your document? You can easily do it by using the techniques described ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 4 + 5?

2024-07-15 11:40:57

Juliana

Thanks for this tip! Very helpful.
One thing: I spent a long time looking for the "paragraph" section of Home and deciphering the symbol for sort, with which I was not familiar. A screenshot of that step prior to the one showing the Sort dialog box would, I think, make this even more helpful.
Sincerely, Juliana


This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.