The Sort command allows you to sort a table using multiple criteria. (While you could use the Sort command to sort a table by a single criterion, it is easier to just double-click the column head of the column by which the table will be sorted. This sorts the data in the column in ascending order. If you double-click again on the column head, the data is sorted in descending order. A small arrow appears in the column head to denote that the table is sorted by the data in that column, with the direction of the arrow indicating whether the sort is ascending or descending.)
When you select the Sort command, the system displays the Sort dialog box. The left side of the dialog box shows the columns available for sorting. The right side shows the columns currently being used for sorting. (If this is the first time you have selected this command since opening the window (or the underlying table is not already sorted), the right side will be blank. Otherwise, it will show the last sort specified.) The arrows between the columns select a column for use in sorting (rightward pointing arrow) or remove a column from being used for sorting (leftward pointing arrow).
To perform a sort for the first time, follow these steps:
- In the left pane, click the primary column to be used for sorting.
- Click the right-pointing arrow to move the column to the right pane.
- The system assumes that the sort will be in ascending order. If you wish to sort in descending order, click the check box in the Ascending column. This clears the check box.
- Repeat steps 1 - 3 for the secondary and subsequent sorts.
- Once the columns for sorting are selected, click OK. The system will then sort the table by the criteria that you specified. The system will also remember how the table is sorted and will sort the table in the same way the next time you open the window.
If you wish to modify the criteria by which a table is sorted, re-display the Sort dialog box. The dialog box will then show the last sort specified. You may then modify this sort as follows:
- To change the order of the sort (that is, what is the primary criterion, what is the secondary criterion, etc.), use the large arrows on the side of the dialog box. Click the row showing the sort criterion and then click the appropriate arrow to move the row up or down in the table. (The system sorts by the first, topmost row, then the second row, and so on.)
- If you wish to change the order of the data in a sort column, check (for ascending) or clear (for descending) the check box in the Ascending column for the row showing the column.
- If you wish to remove a sort criterion from the table, select the row showing the criterion in the right pane and then click the left-pointing arrow in the middle of the dialog box.
- If you wish to add a sort criterion to the table, click the column in the left pane and then click the right-pointing arrow to move it to the right pane. Note that this always adds a row to the end of the table regardless of what row you select. Therefore, after completing the row as directed above, you may need to use the large up arrow on the side of the dialog box to move the row to the proper position in the table.