Sorting the Contents of Tables

Often, you'll want to sort items in a table?perhaps to alphabetize them, place them in numeric order, or organize them by date. Word provides two sorting tools that make this easy:

  • graphics/sortdecending.gif If you simply want to alphabetize a list, click in the column you want to sort by, and click the Sort Ascending or Sort Descending button on the Tables and Borders toolbar.

  • graphics/sortascending.gif If you want more control over how Word sorts your information, choose Table, Sort, and work from the Sort dialog box.

TIP

Although you're most likely to use sorting within tables, it works with any text in your document.


TIP

Some Word users like to organize documents in Outline view using Word's sorting feature. Start with a document that hasn't had outline numbering applied; then click Show Heading 1 to view only the highest-level headings and manually assign numbers to them, based on the order you want them to appear in. Finally, select all the high-level headings (again, with nothing else showing) and click Sort Ascending on the Tables and Borders toolbar to arrange them in the order you want.


Now imagine that you have a slightly more complex list, such as the list of customers in Figure 12.36.

Figure 12.36. Sorting a list of customers.

graphics/12fig36.gif

Select the table and choose Table, Sort. The Sort dialog box appears, as shown in Figure 12.37. You can specify up to three levels of sorting. Imagine that you have a table in which column 1 includes last name, column 2 includes first name, and column 3 includes phone numbers. You might tell Word to sort first based on company names; after those are in order, to sort based on cities; and finally to sort on the sales representatives' names.

Figure 12.37. Using the Sort dialog box to sort rows of a table.

graphics/12fig37.gif

Word gives you a neatly ordered list of companies, in which each company's listings are sorted by city and each company's city listings are sorted alphabetically by name.

You also can tell Word to sort a table alphabetically based on text, sort a field based on date order, or sort a field in numeric order. (These sorts can have different results.) You also can specify whether each sort should appear in ascending or descending order.

Often, you'll have a table with a header row that contains information you don't want to sort. To avoid sorting the top row, click Header Row.

Although the sorting options you've already learned will usually be all you need, occasionally you may need to refine your sorts even further. To do so, click Options in the Sort dialog box. The Sort Options dialog box appears (see Figure 12.38).

Figure 12.38. The Sort Options dialog box.

graphics/12fig38.gif

If you want to sort only the contents of a single column without also moving text in other columns, choose Sort Column Only. This option is available only if you've selected multiple columns for sorting.

NOTE

Word can sort across multiple columns. For example, if first names and last names are stored in separate columns, you can select both columns and sort them together.


Normally, Word sorts are not case sensitive; march and March are listed next to each other. If you want Word to separate them, listing all capitalized words before lowercase words, choose Case Sensitive in the Sort Options box.

Finally, if you are sorting text that is not in a table or separated by paragraph marks, specify the separator you want Word to use in sorting the text. Other than paragraph marks, the most common separators are Tabs or Commas. However, if you want to use another character, you can enter that character in the Other text box.



    Part I: Word Basics: Get Productive Fast
    Part II: Building Slicker Documents Faster
    Part III: The Visual Word: Making Documents Look Great
    Part IV: Industrial-Strength Document Production Techniques
    Part VI: The Corporate Word