Sorting spreadsheet data

    Sorting can help you organize, analyze, and interpret the data in a spreadsheet.

    To sort data in a spreadsheet:
    1 Select the rows, columns, or range of cells you want to sort.
    2 Choose Sort from the Calculate menu.
    3 If you're sorting multiple rows or columns, specify which row or column determines the sort order by typing the address of any cell in that row or column for the 1st Order Key.
    If there are duplicate values in the 1st Order Key you specify, and you want to also sort based on up to two other rows or columns, specify them for 2nd and 3rd.
    For example, if you're sorting two columns, one of last names and one of first names, you can specify that the last-name column should be sorted before the first-name column.
    4 Specify ascending or descending order for sorting.
    5 Select a direction for sorting (Vertical if you're sorting rows, Horizontal if you're sorting columns).
    When you select several rows and specify a vertical sort, values are anchored horizontally across the rows so that related values stay together.
    When you select several columns and specify a horizontal sort, values are anchored vertically down the columns so that related values stay together.

How data is sorted

    The following table describes how different types of data are sorted in either ascending or descending order.

      Data type   Ascending order   Descending order
    Text A, a, ... Z, z z, Z, ... a, A

    Numbers 0 to 9 9 to 0

    Cells containing all text, mixed with cells containing all numbers A, a, ... Z, z, then 0 ... 9, 10 10, 9 ... 0, then z, Z, ... a, A

    Cells containing a mixture of text and numbers Entries starting with numbers first (1z before A1) Entries starting with text first (z1 before 1A)

Related topics


Table of contents | Index