×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Changing sort order

Changing sort order

Changing sort order

(OP)
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?

RE: Changing sort order

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

RE: Changing sort order

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.

RE: Changing sort order

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)...

RE: Changing sort order

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources