Sort

The Data | Data | Sort command arranges data according to rank in user-specified sort columns. Sorting rank is based on numbers, ASCII text characters, and punctuation. Sort numeric data, text, or mixed columns. Sorting specifications are made in the Sort dialog.

 

The Sort Dialog

Use the Data | Data | Sort command in the worksheet to open the 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 by 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.

 

0

1

2

3

4

5

6

7

8

9

space

!

"

#

$

%

&

'

(

)

*

+

,

-

.

/

"0"

"1"

"2"

"3"

"4"

"5"

"6"

"7"

"8"

"9"

:

;

<

=

>

?

@

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

[

\

]

^

_

`

a

b

c

d

e

f

g

h

i

j

k

l

m

n

o

p

q

r

s

t

u

v

w

x

y

z

{

|

}

~

blank

 

 

 

 

This ASCII table shows the sort order in the worksheet, by row from left-to-right.

 

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.

 

To Sort Data:

Select Data | Data | Sort to order selected data.

  1. With a data table selected, use the cursor to highlight data to order.  You can highlight data in as many as three columns in the data table.

  2. Click the Data | Data | Sort command to open the Sort dialog.

The Sort dialog allows you to sort in ascending or descending

order up to three columns of selected data, in any column order.

  1. Click the Sort First By drop-down menu arrow to select the first column to order. The drop down menu is populated by up to three columns of highlighted data.

  2. Select whether this column's data is sorted in Ascending or Descending order.

  3. Repeat these steps for the second column (if at least two columns of data were highlighted) in the Sort Next By field.

  4. Repeat these steps for the third column (if three columns were highlighted) in the Sort Last By field.

  5. Click the Ignore case check box if you want to ignore upper and lower case in the sorted data.

  6. Click the Labels in first row check box if the first row of sorted data includes the label (column header) for the sorted data.

  7. Click OK to save the data sort.

  8. Click Cancel or click the X in the upper right corner to close the dialog without saving.

 

See Also

Transform

Statistics

Data Tab Commands