Sorting by only numbers

G

George

How to sort ignoring letters, Excel 2003
ny only containing numbers,
For example
default sorting wanted sorting
AA101 AC02
AB99 AB99
AC02 AA101
Thanks
George
 
D

Dave Peterson

You'll have to separate the numbers into a different column.

If all the letters are exactly two digits, you could use:
=--mid(a1,3,255)

(the -- converts the text that =mid() produces to a real number.)

Then you can sort your data by using this helper column.
 
G

George

Thank you for your response,

Unfortunately the letters ranging from 2 to 8 Approx, Is there a macro for
it?
 
G

George

Thank you for your response,

Unfortunately the letters ranging from 2 to 8 Approx, Is there a macro for
it?
 
D

Dave Peterson

You could use a formula like:
=--RIGHT(A1,LEN(A1)-MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&"0123456789"))+1)
to get the rightmost group of digits.
 

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