Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing sort order

Status
Not open for further replies.

dgallup

Automotive
May 9, 2003
4,715
Sorting part numbers in ascending order produces the following result:

430-100
430-101
430-98
430-99

Is there any way to change the results of sorting so that part numbers would come out in the following order:

430-98
430-99
430-100
430-101

I see where it is possible to sort by days of the week and months of the year under options. Is there some way to define my own sort order?
 
Replies continue below

Recommended for you

Parse the numeric out of your part number in a separate column and then use that to sort by

Or, change your part numbers to 430-098 etc





Cheers

Greg Locock
 
See Tools/Options/Custom Lists and see if you can make one that does your job. I tried making a custom list usint 430-97,430-98,430-99,430-100,430-101,430-101 and it then sorted the list the way you want. You can create the list using formulas and Excel then use that range of cells to define the list.
 
Try the suggestions mentioned -- I think what is happening in your case is that the part numbers are being treated as text and not numerical, thus it will sort from left to right (i.e. 1 comes before 9 in column 5)...
 
Make a second column, but instead of the hyphen, use a decimal point. Then sort both columns accending based on the values in the column with the decimal numbers.

I thought that I once saw a check box option that said "treat text that looks like a number like a number", but I can't find it anymore. It might have been in a different program, maybe Access.

I did however come across this tidbit in the help:

Apostrophes (') and hyphens (-) are ignored, with one exception: If two text strings are the same except for a hyphen, the text with the hyphen is sorted last.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor