Custom Sort

  • Thread starter Thread starter tpnz
  • Start date Start date
T

tpnz

Hi

I am hoping someone will be able to help me.

I have a worksheet that is based around order numbers issued to staf
members.

I want to sort this worksheet so that the numbers are displayed i
order. My problem is that we issue straight 4 digit numbers, but als
variations of these orders ie. 1234-01.

I want my column to read like this;

1234
1234-01
1234-02
1235
1236
1236-01

and so forth.

Any help most appreciated!
 
I would concatenate the 4-digit numbers with an if function to add "-00",
then they will sort as you wish.......... =IF(LEN(A1)=4,A1&"-00",A1)


1234-00
1234-01
1234-02
1235-00
1236-00
1236-01

If you wish, after sorting, you can eliminate the "-00" by doing Edit >
Replace > and type -00 in the find What: box and leave the Repalce with:
box empty.........then hit Replace all.........then once you Left-justify or
TEXT-format those cells, you have...........

1234
1234-01
1234-02
1235
1236
1236-01


Vaya con Dios,
Chuck, CABGx3
 
Happy to help........thanks for the feedback.........

And I would like to mention that your clear explanation of what you wanted,
accompanied by supporting data, makes coming up with answers/alternatives a
lot easier too..........

Vaya con Dios,
Chuck, CABGx3
 

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

Back
Top