Sorting Your Records

Sometimes, sorting a database can help you locate specific records or arrange the records in a more logical order. You might sort the records by ZIP code, for example, to help group individuals who live in the same geographical area.

To sort a database, first decide which field to sort on. For example, an address database could be sorted by Name or by Cityor it could be sorted by Name within City within State. Each of these sort fields is considered a key .

You can use up to three keys when sorting your database. The first key in the preceding example would be Name, then City, and then State. You can sort your database in ascending order (A, B, C... or 1, 2, 3...) or descending order (Z, Y, X... or 10, 9, 8...).

Caution

graphics/cman.gif

When you select the database range to sort, include all the records but not the column labels. If you select the column label row, it is sorted along with all the other rows and may not remain at the top.


To sort the records in your database, follow these steps:

  1. Select all the records in your database, but do not select the top row (the row with the column labels).

  2. Open the Data menu and choose Sort . The Sort dialog box appears, as shown in Figure 11.10.

    Figure 11.10. Specify the sort criteria.

    graphics/11fig10.gif

  3. Open the Sort By drop-down list, and click the first field you want to sort by.

  4. Click Ascending or Descending to specify a sort order.

  5. To sort on another field, open the top Then By drop-down list, and click the second field you want to sort by.

  6. Click Ascending or Descending to specify a sort order.

  7. To make the sorting operation even more detailed, repeat steps 5 and 6 for the second Then By drop-down list.

  8. Click OK or press Enter .

Tip

graphics/tman.gif

graphics/sort_ascending.gif graphics/sort_descending.gif To quickly sort records by an entry in one of the columns , click any entry in the column that you want to use to control the sorting operation, and then click the Sort Ascending or Sort Descending button in the Standard toolbar.


Caution

graphics/cman.gif

If the sorting operation does not turn out as planned, you can undo the sort. Open the Edit menu and choose Undo Sort or press Ctrl+Z .




Absolute Beginner's Guide to Microsoft Office Excel 2003
Absolute Beginners Guide to Microsoft Office Excel 2003
ISBN: 0789729415
EAN: 2147483647
Year: 2002
Pages: 189

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net