Microsoft KB Archive/214051

= XL2000: Data Sort Selects an Incorrect Range =

Article ID: 214051

Article Last Modified on 11/5/2003

-

APPLIES TO


 * Microsoft Excel 2000 Standard Edition

-



This article was previously published under Q214051





SYMPTOMS
In Microsoft Excel, when you select a single cell in a list, and then click Sort on the Data menu, an incorrect range of data may be selected.



CAUSE
This problem can occur when the data in the second row of the first column in the list is typed entirely in capital letters and the data in the third row of the first column in the list is not typed entirely in capital letters.

When you sort data by selecting a single cell in a list and then clicking Sort on the Data menu, Microsoft Excel detects the column labels in the list, excludes them from the data that is sorted, selects the data to be sorted, and then displays the Sort dialog box.

If the data in the second row of the first column in the list is typed entirely in capital letters and the data in the third row of the first column in the list is not typed entirely in capital letters, Excel treats the first two rows as column labels and does sort these rows.

For example, if you select a single cell in the following list

A1: peach

A2: APPLE

A3: orange

A4: banana

and you then click Sort on the Data menu, the items orange and banana are selected as the data to be sorted. Microsoft Excel treats the items peach and APPLE as column labels and excludes them.



WORKAROUND
To work around this behavior, follow these steps:
 * 1) Select the whole list, including any column labels.
 * 2) On the Data menu, click Sort.
 * 3) In the Sort dialog box, under My list has, click Header row.



MORE INFORMATION
Users may experience similar results whenever Microsoft Excel cannot clearly determine the range of data and header information. For example, data with multiple header rows.

