sort by two columns ends up with wrong sort in 2nd col



I select Data > Sort, select the two columns, yes to header row, and the sort
finishes but only partially correct. the first column sorts fine, and the
second almost sorts fine with one weird exception: there is a small part of
the 2nd column data that sorts through W and then starts again at A. I've
sorted by the 2nd column ONLY, and it sorts correctly. I've copied the data
range into another worksheet and the same problem occurs. there are no
leading spaces in the data, and it's all alpha.


The first column will be the primary sort. The second column is dependant on
the first column. If the value of column 1 changes then the sorting of column
2 will start over again. Perhaps you need to change which column sorts first
and which one second...


hmm, maybe I wasn't clear... the values in the first sort column are last
names, and the values in the second sort column are titles of books written
by the people in the first column. the problem is that when I sort by 1. last
name and 2. title, I end up with this result:

smith A title
smith B title
smith J title
smith W title
smith A title
smith G title
smith K title


so I need to know why the sort of the second column starts over at that odd
point. I hope this was clearer. thanks.


Are you sure there are no leading or trailing spaces in that second column?
Have you applied the TRIM or CLEAN functions to it and then fixed the
values? Perhaps you have some non-breaking space characters (char 160)
lurking around.

Hope this helps.


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question