A sorting question

  • Thread starter Thread starter clayton
  • Start date Start date
C

clayton

I have a series of numbers that need to be sorted.
The numbers go like this

0154-18

The first 3 are the day of year number, the 4th is the year. The -18 i
a part number. I do not care about sorting this -18 part.

I need to be able to sort by year first and then day of year.

IE:

0113-18
0153-23
0154-18
0154-7
1544-20

Any suggestions
 
Suggest using a formula such as this, to extract the info in the order you
want it sorted;

+MID(A1,FIND("-",A1)-1,1)&"-"&LEFT(A1,3)
(turns 0154-18 into 4-015)

and placing it next to the part numbers, then using that (new) column to
sort both the unruly codes and the new codes.
 
Hi Clayton
You will need to reorganize the data in order to egt the sort you want. Assuming the first value is in A1, in a seprate column enter

=MID(A1,4,1)&Left(A1,3

This will convert 0154-18 into 4015. Now you can sort on this helper column

Good Luck
Mark Graesse
(e-mail address removed)
Boston M

----- clayton > wrote: ----

I have a series of numbers that need to be sorted.
The numbers go like thi

0154-1

The first 3 are the day of year number, the 4th is the year. The -18 i
a part number. I do not care about sorting this -18 part

I need to be able to sort by year first and then day of year

IE

0113-1
0153-2
0154-1
0154-
1544-2

Any suggestions
 
Thank you both very much. I can not try this just yet as my computer wa
the victim of several power outages in a row... Nope.. Didn’t have
power surge protector.... I will now though.
Thanks again for your help. You guys and this site have been lif
savers!
 
Back
Top