CREATE CUSTOM SORT IN EXCEL

G

Grayhair

How do I sort the following text; EP2323A-01, EP2323A-02, EP2323A-03,
EP2323A-04, EP2323A-05, EP2323B-01, EP2323B-02, EP2323B-03,
EP2323B-04, EP2323B-05....EP2323F-05. when it is not in any particular
order? I want to sort by the number's 01 first then the letter A-F. Then the
number's 02 and then letters A-F.
 
P

Pete_UK

You could extract those final two digits into a helper column with
this:

=RIGHT(A1,2)

assuming your data is in A1, and copy this down.

Include the helper column within your sort range and sort on that as
the first field and your data as the second field.

Hope this helps.

Pete
 
M

Mike H

hi,

You need 2 helper columns and assuming your data in column A put this in b1
and drag down

=RIGHT(A1,2)

Then this in c1 and drag down

=MID(A1,7,1)

Now select all 3 columns and sort first on column B ascending and a
secondary sort on column C ascending. You will probably be prompted if you
want to sort anything that looks like a number as a number. Click OK

Delete or hide the helper columns.

Mike
 

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