how do i sort a column numerically going from 01-01 to 225-99

C

column sorting

when i sort my column in numerical order, it starts out fine, i.e 01-01,
01-02. However, when it gets to 10-01, i get 10-01, 100-01,100-02, etc,
without any rhyme or reason. How do i set to sort 01-nn through 99-nn befor
going to 100-nn and beyond
 
D

Dave Peterson

Excel's help explains it.

I searched for: Default sort orders

Apostrophes (') and hyphens (-) are ignored, with one exception: If two text
strings are the same except for a hyphen, the text with the hyphen is sorted
last.

One way around it (maybe???) is to use a helper column with a formula in it.
Then sort your data by that helper column.

If your data is in A1:Axx, put this in that helper column (row 1):

=--SUBSTITUTE(A1,"-",".")

And drag down.

Then sort by that column. Since the data is now numeric, it should work ok.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top