Sortofa sorting problem.....

gcanders

New Member
Joined
Oct 30, 2002
Messages
12
I tried to sort the following in Excel, but this is what I got:

1) HD 1694.C2 H83 1992
2) HD 4464.L7 H64
3) HD 4464.L7 K33 1982
4) HD1387 .A663 1996
5) HD259 .H43 1999
6) HD7293 .S675 1999

Line 5 should be before line 4. Is there a way for Excel to do this? By the by - these are card catalog numbers (in case you were curious). Thanks.......
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
The problem is that the numbers in the catalog number are viewed by Excel as text, not values. Since "1" comes before "2", Excel will always sort the 1's first. I don't know all the possible answers, but if the catalog entries can be split up into separate columns (ie: HD in 'A'; 1239 in column 'B" etc) then you could perform the sort operation as you want.
 
Upvote 0
Yes - I tried doing the data-sort and the results were posted on the original message. I seem to recall this might be a vba problem (by problem, I mean my experience with vba is a bit limited - but I'm happy to learn).
 
Upvote 0
NORMPAM: The problem with catalog numbers is that I can't simply split them (text to columns), because the letter part of the number varies (i.e. sometimes it's 1 digit, or 2 (as in my example), etc.). Thanks for your reply, though.
 
Upvote 0
If you would like to send me a sample file, I might be able to come up with a solution.

E-mail:acsadvantage@aol.com
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,701
Members
448,980
Latest member
CarlosWin

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