sorting problems

Tonto111

Board Regular
Joined
Jun 17, 2002
Messages
83
I have a macro that shows contracts of a certain type (supply, construction, etc.) It then sorts the contracts in order, with the highest number (most recent contract) on top.

However, we recently changed the prefix for our contracts from 670X to 528X, but kept the sequential numbers at the end. For example, an old contract would be 670X-100, while the next contract under the new system would be 528X-101. When you try to sort by descending order, it wants to put these new contracts at the bottom because 528 is less than 670. Any ways to get around this? THANKS
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
You might trying to insert a column and identifying the contracts A for the series that starts with 6.... then B for the series that begin with a 5....

Then do a double sort with this field first then the contract number field second....

This may not be the cleanest way but it should get the job done.


good luck

pll
This message was edited by plettieri on 2002-10-15 14:32
This message was edited by plettieri on 2002-10-15 14:33
 
Upvote 0
Sort on a column containing the formula...

=RIGHT(A1,LEN(A1)-FIND("-",A1))

...where column A contains your original value.
 
Upvote 0
I ended up just putting a space in front of the 670, now when I sort in descending order the 528 contracts are on top. Yay :LOL:
This message was edited by Tonto111 on 2002-10-16 11:08
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,251
Members
448,556
Latest member
peterhess2002

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top