ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sort Key Warning (https://www.excelbanter.com/excel-discussion-misc-queries/182104-sort-key-warning.html)

Chris

Sort Key Warning
 
On occasion, when I sort an Excel worksheet on a field that is defined as
text and is all numbers, I get a sort warning:
The following sort key may not sort as expect? 1. Sort anything that looks
like a number, as a number? 2. Sort numbers and numbers stored as text
separately?

Frequently it occurs when I have imported a text file into Excel.

--
Thanks!
Chris

Tyro[_2_]

Sort Key Warning
 
1,5,12 stored as numbers sort as: 1,5,12. When stored as text, they sort as
1,12,5. You're being asked how you want to sort the data.

Tyro

"Chris" wrote in message
...
On occasion, when I sort an Excel worksheet on a field that is defined as
text and is all numbers, I get a sort warning:
The following sort key may not sort as expect? 1. Sort anything that looks
like a number, as a number? 2. Sort numbers and numbers stored as text
separately?

Frequently it occurs when I have imported a text file into Excel.

--
Thanks!
Chris




Kevin B

Sort Key Warning
 
It's not so much as a warning, it's a request to define how you want to treat
numbers stored as text in the sort range.

The following list would be sorted as text in this manner if you choose 2

Original Sorted
1 1
3 12
12 2
2 21
21 3

If you were expecting a numeric sort this would come as surprise.

The request is for confirmation on how to proceed with the sort.
--
Kevin Backmann


"Chris" wrote:

On occasion, when I sort an Excel worksheet on a field that is defined as
text and is all numbers, I get a sort warning:
The following sort key may not sort as expect? 1. Sort anything that looks
like a number, as a number? 2. Sort numbers and numbers stored as text
separately?

Frequently it occurs when I have imported a text file into Excel.

--
Thanks!
Chris


Alan

Sort Key Warning
 
Tyro and Kevin have already explained the reason for the message.
If you want to convert all your imported text numbers to true numbers, try
this:-
Enter 1 into an empty cell,
Right click the cell Copy
Highlight all the cells containing the numbers to convert
Right click the highlighted range Paste Special
In the 'Operation' section check 'Multiplication' OK
Delete the '1' from the empty cell,
Regards,
Alan.
"Chris" wrote in message
...
On occasion, when I sort an Excel worksheet on a field that is defined as
text and is all numbers, I get a sort warning:
The following sort key may not sort as expect? 1. Sort anything that looks
like a number, as a number? 2. Sort numbers and numbers stored as text
separately?

Frequently it occurs when I have imported a text file into Excel.

--
Thanks!
Chris




All times are GMT +1. The time now is 07:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com