This browser does not support basic Web standards, preventing the display of our site's intended design. May we suggest that you upgrade your browser?

Microsoft Excel 2007

Sorting Data

The Sort command arranges worksheet data by text (i.e., A to Z, Z to A), numbers (i.e., smallest to largest, largest to smallest), dates, or times (oldest to newest, newest to oldest). This document shows you how to sort your Excel 2007 worksheet data.

NOTE: Once data is sorted, subgroups can be subtotaled. For more information refer to Calculating Subtotals in Databases.

return to topSorting Data: Sort Button

If you simply want to sort your data by one column from smallest to largest or largest to smallest, you can do so with one click.

  1. Select a cell in the column used to sort
  2. From the Data command tab, in the Sort & Filter group, click SORT SMALLEST TO LARGESTSort Smallest to Largest buttonor SORT LARGEST TO SMALLESTSort Largest to Smallest
    The selected column is sorted.

return to topSorting Data: Sort Dialog Box

Using the Sort dialog box, you can create multi-level sorts that meet a variety of specifications.

  1. Select a cell in the column you want to use to sort

  2. From the Data command tab, in the Sort & Filter group, click SORTSort button
    The Sort dialog box appears.
    Sort dialog box

  3. To sort by ascending or descending values (i.e., alphabetically, numerically, time, or date)
    1. In the Sort by pull-down list, select the column you want to use to sort
    2. In the Sort On pull-down list, select Values
    3. In the Order pull-down list, select A to Z or Z to A
      The data is sorted according to the selected order.

  4. To sort according to a custom list
    1. In the Sort by pull-down list, select the column you want to use to sort
      EXAMPLE: select a column containing days of the week
    2. In the Sort On pull-down list, select Values
    3. In the Order pull-down list, select Custom List...
      The Custom Lists dialog box opens
    4. Select the custom list by which you want to sort
      EXAMPLE: select Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday

  5. To sort according a formatting criterion
    1. In the Sort by pull-down list, select the column you want to use to sort
    2. In the Sort On pull-down list, select the appropriate option
      EXAMPLE: Select Cell Color
    3. In the Order pull-down list, select a color and appropriate sort order
      EXAMPLE: select Blue and On Top

  6. OPTIONAL: To sort by more than one column
    1. Click ADD LEVELAdd Level button
    2. In the Then by row of the Sort dialog box, select the additional sort options

  7. OPTIONAL: To control how to sort lists of days or months, case-sensitive data, and orientation
    1. Click OPTIONS...
      The Sort Options dialog box appears.
      Sort Options dialog box
    2. Make necessary changes
    3. Click OK

  8. Click OK
    The data is sorted.

Excellence. Our Measure. Our Motto. Our Goal.