Sorting Starting at Second Character

J

jlclyde

I think the Subject says it all. I have a list of items and they
start with M. So they read M1, M2, M3 ...Etc. When you sort this it
puts all the M1s together, like M1, M10, M100. Is there a way in
excel to have it skip the first character and sort by just the
numbers? If there is not, then I will have to split it into seperate
columns, sort, and then put them back together.

Thanks,
Jay
 
F

FSt1

hi
custom sorts are usually done with a helper column.
in a blank column to the right of your data, enter this formula.....
assuming a header row....
=right(A2,len(a2)-1)

copy down as far as needed.
sort with the helper column as primary sort.

regards
FSt1
 
G

Gord Dibben

In an adjacent column =RIGHT(A1,LEN(A1)-1)

Double-click on the cell to fill down.

Sort on that column.

If happy, delete the column.


Gord Dibben MS Excel MVP
 
G

Gord Dibben

Note: when you are sorting you will be asked what to do with text that look
like numbers.

Select treat as numbers.


Gord
 
J

jlclyde

hi
custom sorts are usually done with a helper column.
in a blank column to the right of your data, enter this formula.....
assuming a header row....
=right(A2,len(a2)-1)

copy down as far as needed.
sort with the helper column as primary sort.

regards
FSt1






- Show quoted text -

i am thinking that I will just do a macro to do text to columns. Then
sort, then put the cells back together. should be pretty simple. I
was just hoping for another way to do this.

Thanks,
Jay
 

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