18.11.2014 Views

Microsoft Office

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Introducing Tables 6<br />

Sorting a table<br />

Sorting a table rearranges the rows based on the contents of a particular column. You may want to sort a<br />

table to put names in alphabetical order. Or, maybe you want to sort your sales staff by the totals sales<br />

made.<br />

To sort a table by a particular column, click the drop-down in the column header and choose one of the<br />

sort commands. The exact command varies, depending on the type of data in the column.<br />

You can also select Sort By Color, to sort the rows based on the background or text color of the data. This<br />

option is relevant only if you’ve overridden the table style colors with custom colors.<br />

NOTE<br />

When a column is sorted, the drop-down in the header row displays a different graphic to<br />

remind you that the table is sorted by that column.<br />

You can sort on any number of columns. The trick is to sort the least significant column first and then proceed<br />

until the most significant column is sorted lasted. For example, in the real estate table, you may want<br />

the list to be sorted by agent. And within each agent’s group, the rows should be sorted by area. And within<br />

each area, the rows should be sorted by list price. For this type of sort, first sort by the List Price column,<br />

then sort by the Area column, and then sort by the Agent column. Figure 6.10 shows the table sorted in this<br />

manner.<br />

FIGURE 6.10<br />

A table, after performing a 3-column sort.<br />

Another way of performing a multiple-column sort is to use the Sort dialog box. To display this dialog box,<br />

choose Home ➪ Editing ➪ Sort & Filter ➪ Custom Sort. Or, right-click any cell in the table and choose<br />

Sort ➪ Custom Sort from the shortcut menu.<br />

In the Sort dialog box, use the drop-down lists to specify the first search specifications. Note that the<br />

searching is opposite of what I described in the previous paragraph. In this example, you start with Agent.<br />

Then, click the Add Level button to insert another set of search controls. In this new set of controls, specify<br />

105

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!