Sorting data in a Word Document is not something that most of us do on a daily basis. But, having lists and table data is, to it would follow that there is real potential here that someone day you may just want to sort something.
Word relies on paragraphs when it sorts. (I know that may sound odd in the context of a table or list). The paragraph formatting mark determines where one paragraph ends and the next one starts. If you have enabled Show/Hide and create a small table, you will see that there is no paragraph mark in a table. The end-of-cell markers denote the end of each cell’s content. The similar marker at the end of each row (outside the right border) is an end-of-row marker. These markers also contain cell and row formatting. When sorting a table, Word relies on the end-of-row marker to identify where one row ends and the next begins, the same way the paragraph mark does.
Sort by the First Column
The simplest sort is sorting by the first column. So let’s sort the values in the first value of our table (for this purpose that will the Classes). To get started, select the table by clicking its move handle which is the small square in the top left side corner. This is only available to you when in Print Layout and Web Layout.
With you entire table selected:
- Click the contextual Layout tab.
- In the Data group, click Sort. Alternatively, click sort in the Paragraph group on your Home tab.
- Notice that your Header row option at the bottom has been selected.
- As a result the Sort By field is set to Classes, the label in the first column’s header.
That is precisely what we want for this exercise, so click OK.
The Type and Using options to the right in the Sort dialog box should be discussed even though we did not use them, because sometimes you will use them. Now then the Type options are Text, Number and Date. Word usually defaults to the appropriate data type/ You can force a certain type by selecting a different option other than the one Word has assumed to use, although you will rarely have a reason to do so. The Using option defaults to Paragraph, which we discussed above.
Sort by the Second Column
Ok the first sort was easy – remember I said it was the simplest? But now we will complicate things a tad by sorting the second column. Luckily, it is just as easy as the first. Simply repeat steps one and two as we did above. Then, do the following:
So thus far you have learned how to sort by the first column and then the second column and one is as easy as the other.
Now though, we will complicate this a bit further and show you just how flexible this feature really is.
Let’s sort by the Location column and then sort by by the Classes in a secondary sort.
Just repeat steps 1 and 2 like we have done previously.
To sort by Location, select Location from the Sort By drop-down.
To further sort each group, click Classes from the Then by drop-down. You could add a third column to the sort if the results warranted the additional grouping.
If you are wondering how to sort the same data in list form, Word handles the list sort in the same way. Simply highlight the list and click Sort in the Paragraph group on your Home tab.
In the resulting dialog, check the header option and set appropriately, if need be.
Then determine the sort order by selecting the fields (columns) appropriately.