Microsoft Office Tutorials and References
In Depth Information
Sorting by Two Fields: The Hows and Whys
2. Click Home Sort & Filter
Custom Sort, and you’ll
see the dialog shown in
Figure 7–7. The Sort dialog box
NOTE: The Sort by field is filled with Last Name, because that’s the field in which we click to
start the process. If you click in the wrong field by mistake, you can just click the accompanying
drop-down arrow, which lists all the fields in the data base. Note in addition the Order field
displays A to Z, the default sorting option selected by Excel. If you want to sort the field as per
the Z-to-A ordering, click the drop-down arrow and select that option (there’s a bit more to say
about the other Sort On options; we’ll get to that a bit later).
3. We want to sort by two fields—so where’s the second one? Click the
Add Level button, and you’ll see a second entry beneath the Column entry,
entitled Then by.
4. Click the drop-down
arrow and click Salary,
the second field by
which we want to sort
(see Figure 7–8).
Figure 7–8. The second sort field comes into view.
NOTE: By default, Excel checks the My data has headers check box, thus telling the application
not to sort the first row in the database.
5. Now that we’ve added the second field to be sorted, we need to look at
Order, which reads Smallest to Largest. Click that down arrow and select
Largest to Smallest, the direction in which we want to sort Salary.