Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an Excel 2003 spreadsheet that I'm sorting on the first column, which is formatted as Text. The sort order is strange. Here's a "sorted" example. I've highlighted the anomaly.
120-SSXX <==== Why is 120-S after 120G-PR?

Am I missing something or does Excel define alphabetical order differently than most people?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

It ignores the dashes.

share|improve this answer
Thanks -- found mvps.org/dmcritchie/excel/sorting.htm which states the same thing. I guess there may be situations where you want this to happen. –  Keeloid Feb 4 '10 at 19:23

Maybe you should create separate columns on which to sort and then sort on multiple columns.
1. the column that has "120" etc.
2. the column that has or has not "G" etc.
3. the column that has "BDXX" etc
This would also make things like filtering, pivot tables, viable. I would do that. Either manually or by a VBA macro using regexp. Hope that helps you arrive at a useful and flexible solution. Don't get into a trap of working with convoluted data packed into one string.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.