Performing Complex Sorts

By using the sorting capabilities of Excel you can perform complex sorting of either an entire list or any portion of a list. If you want to sort an entire list, you only need to select a single cell within the list. If you want to sort a portion of a list, you need to select those rows (they must be contiguous) that you want sorted.

  1. Display the Data tab of the ribbon.
  2. Click the Sort tool. Excel displays the Sort dialog box. Using this dialog box, sorting is performed according to criteria you set. (See Figure 1.)
  3. Figure 1. The Sort dialog box.

  4. Use the Sort By drop-down to select the field (or column) by which you want to sort.
  5. Click Add Level each time you want to specify a secondary sorting key.
  6. Specify for each sorting key whether you want that field to be sorted in ascending or descending order.
  7. Click the Options button to display the Sort Options dialog box where you can specify whether you want capitalization to matter and whether you want to sort rows or columns. (See Figure 2.)
  8. Figure 2. The Sort Options dialog box.

  9. Click on OK to close the Sort Options dialog box.
  10. Click on OK to complete your sort.