Sort not working as expected

G

geoff_ness

I'm getting some unexpected results from sorting the range below (the
"Blank" entries are actually blank). I have used Data-> Sort and
specified Sort by Column C, then by Column B, then by Column A (all
ascending), with the below results.

Column A Column B Column C
28-Oct-08 24-Nov-08 25-Nov-08
21-Nov-08 25-Nov-08 26-Nov-08
11-Nov-08 27-Nov-08 27-Nov-08
20-Oct-07 31-Jul-08 Blank
13-Oct-08 21-Nov-08 Blank
23-Jul-08 Blank Blank
10-Sep-08 Blank Blank
Blank 21-Oct-08 Blank

Now I would have thought that, for instance, where there are blank
cells in Column C, the rows would be sorted by values in Column B, but
that clearly hasn't happened. What am I missing?
 
M

macropod

Hi geoff,

I get a different result with both Excel 2000 and 2007:

28-Oct-08 24-Nov-08 25-Nov-08
21-Nov-08 25-Nov-08 26-Nov-08
11-Nov-08 27-Nov-08 27-Nov-08
20-Oct-07 31-Jul-08 Blank
Blank 21-Oct-08 Blank
13-Oct-08 21-Nov-08 Blank
23-Jul-08 Blank Blank
10-Sep-08 Blank Blank

I believe this is the correct result for a C:B:A sort. I suspect your first 4 'blank' cells in column C aren't - they've probably
got space characters in them.
 
G

geoff_ness

Quite right, thanks macropod. How embarrassing, I should have spotted
that. :)

Hi geoff,

I get a different result with both Excel 2000 and 2007:

28-Oct-08 24-Nov-08 25-Nov-08
21-Nov-08 25-Nov-08 26-Nov-08
11-Nov-08 27-Nov-08 27-Nov-08
20-Oct-07 31-Jul-08 Blank
Blank 21-Oct-08 Blank
13-Oct-08 21-Nov-08 Blank
23-Jul-08 Blank Blank
10-Sep-08 Blank Blank

I believe this is the correct result for a C:B:A sort. I suspect your first 4 'blank' cells in column C aren't - they've probably
got space characters in them.
--
Cheers
macropod
[MVP - Microsoft Word]



geoff_ness said:
I'm getting some unexpected results from sorting the range below (the
"Blank" entries are actually blank). I have used Data-> Sort and
specified Sort by Column C, then by Column B, then by Column A (all
ascending), with the below results.
Column A  Column B  Column C
28-Oct-08 24-Nov-08 25-Nov-08
21-Nov-08 25-Nov-08 26-Nov-08
11-Nov-08 27-Nov-08 27-Nov-08
20-Oct-07 31-Jul-08 Blank
13-Oct-08 21-Nov-08 Blank
23-Jul-08 Blank Blank
10-Sep-08 Blank Blank
Blank 21-Oct-08 Blank
Now I would have thought that, for instance, where there are blank
cells in Column C, the rows would be sorted by values in Column B, but
that clearly hasn't happened. What am I missing?- Hide quoted text -

- Show quoted text -
 

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

Top