Categories
Microsoft Word

Sort Text

Learn how you can sort text (paragraph, headings, or delimited lists) into ascending or descending order by clicking the Sort button in the Paragraph group on the Home tab.

In Microsoft Word, you can sort paragraphs that aren’t in a table. First, select the text you want to sort and click the Sort button in the Paragraph group on the Home tab. This opens the Sort Text dialog box which contains the following options:

  1. Sort by:
    Word allows you to sort paragraphs, headings, and fields. The Sort by menu lists:
    • Paragraph
      This option treats the selected text as regular paragraphs. You can use this option to sort paragraphs, bulleted lists and numbered lists.
    • Heading
      This option sort the text by headings in the selection. For example, if you select the entire document by pressing the Ctrl+A button, and then use this option to sort the document by heading, all top-level headings will be arranged along with the text beneath them.
    • Field 1, Field 2 …
      You’ll see the Field 1, Field 2, Field 3 and so on if the paragraph contains comma separated or tab seaparated data. For example, in a comma seaprated text, the text before the first comma will Field 1, text before the second comma will be Field 2 and so on.
  2. Type:
    You can arrange text in alphabetic, numeric, or date order based on the text in each paragraph.
    • Text
      Select this option if the text selection(paragraph, heading or field) is alphabetic or mixed.
    • Number
      Select this option if the text selection(paragraph, heading or field) is numeric.
    • Date
      Select this option if the text selection(paragraph, heading or field) is a date field.
  3. Choose whether to sort Ascending or Descending.
  4. Then by:
    To sort by additional fields. The Sort Text dialog box have two Then by areas, the first Then by area will be available when you select a Field (Field 1, Field 2, etc.) from the Sort by menu and the second Then by area will be available when you select a Field (Field 1, Field 2, etc.) from the first Then by menu. Then by areas contain similar commands as Sort by area have.
  5. My list has:
    First, it provides labels in the Sort by and Then by drop-down lists. Second, it excludes the header row from the sort.
    • Header row
      Select this option to exclude the first paragraph or field from the sort.
    • No header row
      Select this option to include the first paragraph or field for sorting.
  6. Options:
    Click this button to open the Sort Options dialog box.

Sort Options

The Sort Options dialog box provides additional sort settings, including how fields are delimited, make sort case-sensitive, and select the sorting language:

Click Options button to open Sort Options dialog box
  1. Separate fields at:
    This area enables you to set how fields are delimited, you can choose Tabs, Commas, or Other (write a delimiter character in the box).
  1. Sort options:
    • Sort columns only
      This option is available when you select a table column and want only that column to be sorted.
    • Case sensitive
      Check this box for case-sensitive sorting.
  1. Sorting language:

Select the sorting language from the list.

Sort Paragraphs or Lists Alphabetically

In this example, we’ll alphabetically sort the most populous European countries in our Word document.

Sort Text dialog box
  1. Write some European countries name in the document and select them.
  2. Click Home tab
  3. Click Sort icon on the Paragraph group to open the Sort Text dialog box
  4. On the Sort by area:
    • Choose Paragraphs from the menu
    • Choose Text from the Type menu.
    • Choose Ascending (or Descnding)
  5. On My list has area, click Header row if the selected text contains a heading or title.
  6. Click OK

Sort Headings

Sort headings (the paragraphs beneath a heading will also move with the headings)
  1. Write some sample content with headings and select the text.
  2. Click Home tab
  3. Click Sort icon on the Paragraph group to open the Sort Text dialog box
  4. On the Sort by area:
    • Choose Headings from the menu.
    • Choose Text from the Type menu.
    • Choose Ascending (or Descnding) option
  5. On My list has area, click No header row.
  6. Click OK

Sort Delimited Text (Field 1, Field 2 …)

Sort tab delimited text

To sort delimited data, select the entire text/data/list. On the Home tab, in the Paragraph group, click the Sort button. In the Sort Text dialog box, do the following:

  1. In the Sort by area, select the field (Field 1, Field 2, etc.) by which you want to sort the data.
  2. Select the content type (Text, Number, or Date) if necessary (Word automatically selects the type based on the data).
  3. Choose Ascending or Descending.
  4. In the Then by areas, configure additional nested sorting criteria.
  5. Select Header row from the My list has area (notice the Field 1, Field 2 … replaced with their corresponding header in Sort by and Then by menu).