Sort a range

Microsoft Office Excel 2003

  1. Click a cell in the column you would like to sort by.
  2. Click Sort Ascending Button image or Sort Descending Button image.

Note   In a PivotTable report, Microsoft Excel uses the selected field to sort.

ShowSort rows by 2 or 3 columns

For best results, the range you sort should have column labels.

  1. Click a cell in the range you want to sort.
  2. On the Data menu, click Sort.
  3. In the Sort by and Then by boxes, click the columns you want to sort.
  4. Select any other sort options you want, and then click OK.

Show Sort by 4 columns

  1. Click a cell in the range you want to sort.
  2. On the Data menu, click Sort.
  3. In the first Sort by box click the column of least importance.
  4. Click OK.
  5. On the Data menu, click Sort.
  6. In the Sort by and Then by boxes, click the other 3 columns you want to sort, starting with the most important.
  7. Select any other sort options you want, and then click OK.

ShowSort rows by months or weekdays

  1. Select a cell or range you want to sort.
  2. On the Data menu, click Sort.
  3. In the Sort by box, click the column you want to sort.
  4. Click Options.
  5. Under First key sort order, click the custom sort order you want, and then click OK.
  6. Select any other sort options you want, and then click OK.

Show Use your own data as the sort order

  1. In a range of cells, enter the values you want to sort by, in the order you want them, from top to bottom. For example:

    Data
    High
    Medium
    Low
  2. Select the range.

  3. On the Tools menu, click Options, and then click the Custom Lists tab.

  4. Click Import, and then click OK.

  5. Select a cell in the range you want to sort.

  6. On the Data menu, click Sort.

  7. In the Sort by box, click the column you want to sort.

  8. Click Options.

  9. Under First key sort order, click the custom list you created. For example, click High, Medium, Low.

  10. Click OK.

  11. Select any other sort options you want, and then click OK.

Note   You can't use a custom sort order in a Then by box. The custom sort order applies only to the column specified in the Sort by box. To sort multiple columns by using a custom sort order, sort by each column separately. For example, to sort by columns A and B, in that order, first sort by column B, and then specify the custom sort order by using the Sort Options dialog box. Next, sort the range by column A.

ShowSort columns by rows

Most of the time, you sort rows. This procedure sorts the order of columns.

  1. Click a cell in the range you want to sort.
  2. On the Data menu, click Sort.
  3. Click Options.
  4. Under Orientation, click Sort left to right, and then click OK.
  5. In the Sort by and Then by boxes, click the rows you want to sort.

Note   When you sort rows that are part of a worksheet outline, Microsoft Excel sorts the highest-level groups (level 1) so that the detail rows or columns stay together, even if the detail rows or columns are hidden.