Forum Discussion

Inquisitive's avatar
Inquisitive
Copper Contributor
Oct 25, 2020
Solved

Text not sorting correctly

Sort is not working for me in the attached file while trying to sort the first column at first level and the second column at second level. I had manually entered all values. There doesn't seem to be...
  • mathetes's avatar
    Oct 25, 2020

    Inquisitive 

     

    Actually, appearances to the contrary, it IS working just as it's supposed to.

     

    The problem is that mixing numeric and alpha characters within a single cell causes a sort that to your eyes and minds (as well as mine, I'll admit) seems wrong. But try turning it back from text to numbers and entering the following as a column of numbers. 1,1b,1c,2,3    and sort. The result will be 1,2,3,1b,1c. Yep, 1b follows rather than preceding, numbers 2 and 3. And so on down the line.

     

    What you need to do if you want it to sort based on how you apparently want it to sort, is to create a third column with the letters that modify the numbers in your Column B. Then sort on the basis of the three columns.

Resources