Show me how Excel can sort numbers and text in the order I want
April 17, 2008 12:26 PM
Subscribe
Any Excel gurus in the room? I have an Excel spreadsheet with over 800 rows of data. Each row begins with a number (like 0001), and some have letters after the numbers (like 0001a). The Sort function doesn’t sort the way I’d like it to.
Each row begins with a number, which is sequenced as follows...
0001
0001a
0001b
0002
0003a
0004
...you get the idea. Not every number gets a letter, but some do. The spreadsheet relies on continuous use of AutoFilters and sorting options to retrieve the data I need. However, “Sort Ascending” always changes the order of these numbers into an undesirable result. It sorts numbers first, and then numbers-with-letters, as follows:
0001
0002
0004
0001a
0001b
0003a
That’s bad. It’s cumbersome to find and sort the data. I can’t seem to make this work the way I want it to. I’ve tried using “Format Cells” to specify the cells are text, not numbers. I’ve also read through this
support document from Microsoft, and tried the solutions there, but the same thing continues to happen. Am I doing something wrong?
If anybody has had experience resolving this problem before, I’d love to hear about your method and solution!
posted by Milkman Dan to computers & internet (7 comments total)
3 users marked this as a favorite
Make a new column beside your existing labels and beside each one (say the first one's in cell A1 and your new column is B), put
=text(A1,"00000")
Now you'll have actual strings that you can copy and paste-as-values back over the originals (if they look like what you want!) and it should sort like you want.
posted by Wolfdog at 12:38 PM on April 17 [1 favorite]