Sorting Numbers that have Text
On Thu, 3 Dec 2009 09:30:01 -0800, Ginger Kohler
wrote:
I need to sort like this
1
5
90
90a
90b
100
170a
170b
instead of
1
5
90
100
90a
90b
170a
170b
I found a message from 2006 that said to do this:
"I'd convert the column to Text. (Data-Text to Columns...)
Then, sort, making sure to check "Sort number and numbers stored as
text separately."
I did what was suggested and got this:
1
100
170a
170b
5
90
90a
90b
So, how do I get it to sort the way I want? (the numbers go up into the
1000's)
You need to set up TWO helper columns
The first column has just the numeric values
The second column has just the alpha values
Then you select all three columns
Sort by column 2
then by column 3
Column 1 will wind up sorted as you describe.
So, with your data A1:A8
B1: =LOOKUP(1E+307,--LEFT(A1,ROW(INDIRECT("1:10"))))
C1: =SUBSTITUTE(A1,B1,"")
Select B1:C1 and fill down to B8:C8
Select A1:C8
Data/Sort
First by column B
then by Column C
Voila!
--ron
|