Datasheet

588
Sorting Data
Sorting the columns of a data list
You can use Excel’s column sorting capability to change the order of the
fields in a data list without having to resort to cutting and pasting various
columns. When you sort the fields in a data list, you add a row at the top
of the list that you define as the primary sorting level. The cells in this row
contain numbers (from 1 to the number of the last field in the data list) that
indicate the new order of the fields.
Figures 1-11 and 1-12 illustrate how you can use column sorting to modify
the field order of a data list in the sample Personnel data list. As you see in
Figure 1-11, I began this process by inserting a new row (row 1) above the
row with the field names for this data list. The cells in this row contain
numbers that indicate the new field order. After the fields are sorted
using the values in this row, the SSN field remains first (indicated by 1),
the Department field becomes second (2), Supervisor field third (3),
followed by First Name (4), Middle Name (5), Last Name (6), Title (7),
and Salary (8).
Figure 1-11:
Personnel
data list
before
sorting the
columns.
30_489598-bk06ch01.indd 58830_489598-bk06ch01.indd 588 3/27/10 12:46 PM3/27/10 12:46 PM