Sorting and Filtering Data

The order in which you enter the records in your database doesn’t ultimately matter, because you can sort and filter the table after the fact. Sorting simply changes the order in which the rows or records are displayed, whereas filtering creates a display of only those rows or records that fit criteria you have specified.

Sorting data

The easiest way to sort is to simply select any cell in the column you want to sort by and then click either the Sort Ascending or Sort Descending buttons in the Sort * Filter group of the Data tab on the Ribbon. The Sort Ascending button sorts from A to Z (it’s the one with A on top and Z on the bottom). Technically speaking, it sorts from zero to Z, but that wouldn’t make as good an icon. The Sort Descending button sorts from Z to A (okay, Z to zero), and it’s the one with Z on top and A on the bottom. Figure 19-14 shows data sorted in descending order by year.

Figure 19-14. Sort the list or table to change its order.

The drawback to this method, as with so many things that are simple to use, is that it lacks real power. Often, you’ll find that you need to sort by more than one column. For instance, you might need to sort a customer database by both state and product ordered so you can determine which products are selling best in which states. Or you might want to sort the weather database by year ...

Get Office 2007 Bible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.