Sort - Worksheet

Click the Data | Data | Sort command to arrange data according to rank in user-specified sort columns. Sorting rank is based on numbers, ASCII characters, and punctuation. You can sort numeric data, text, or mixed columns.

 

Sort Dialog
Use the Data | Data | Sort command to sort data on multiple columns.

Selecting Cells to Sort

Sorting is performed only on the selected columns. If only one column is selected, only that column is sorted. To keep records (rows of data) together, select all columns containing data even if only one column is sorted. To decrease sort time, select a block of cells rather than clicking on the row or column labels.

Sort Order

The Sort First By option defines the primary column on which the rows are sorted. The positions of the sorted rows are determined by the Ascending or Descending rank in the Sort First By column.

Secondary Sort

When two or more rows have identical entries in the Sort First By column, the Sort Next By column can further organize the data set. Duplicates in the Sort First By column are then sorted according to the rank in the Sort Next By column.

Final Sort

The Sort Last By column can be used when the Sort Next By column contains duplicates.

Ascending or Descending Sort

The sort order in an Ascending sort is based on the ASCII table. Numeric values are placed first, followed in order by cells starting with a space character, common punctuation, numeric text (numbers entered as text), uppercase letters, less common punctuation, lower case letters, uncommon punctuation, and blank cells. Descending order is the opposite of ascending order although blank cells are still listed last.

ASCII Characters
This ASCII table shows the sort order in the worksheet.

Ignore Case

Because sorting is based on an ASCII table, upper and lowercase letters are treated differently. For example, "A" is sorted separately from "a." If the letters are to be treated as the same during the sort, check the Ignore case option. When this check box is activated, "A" is considered identical to "a" in the sorting rank.

Labels in First Row

The data set may contain text identifying the data in the column (header information) in Row 1. In this case, click the Labels in first row option to exclude the label row from the sort process.

See Also

Transform

Statistics

Transpose