More columne sorting

B

BEOPS

I have a quite normal worksheet with 5-6 columns filled with text info
The cells are defined as text
I like to sort the columnes by first col A and then by Col B. I am doing by
the schoolbook (I think), meaning that I am using the data sort function,
selecting first A then B. However B is sorted in a strange way, like in
groups. Words starting with a in Col B, can show up in two groups, with other
groups of letters in between. Any idea of what's wrong?
BEO
 
S

smartin

BEOPS said:
I have a quite normal worksheet with 5-6 columns filled with text info
The cells are defined as text
I like to sort the columnes by first col A and then by Col B. I am doing by
the schoolbook (I think), meaning that I am using the data sort function,
selecting first A then B. However B is sorted in a strange way, like in
groups. Words starting with a in Col B, can show up in two groups, with other
groups of letters in between. Any idea of what's wrong?
BEO

There is nothing wrong; this is the way simultaneous sorting on multiple
columns is supposed to work. It keeps the related data on the same row.

Consider the following table showing employees and the the award(s) they
received:

A B
Name Award
Clive J
Dana K
Adam Z
Adam K

Now you want to sort, first by Name, then Award Code. The correct result is:

Adam K
Adam Z
Clive J
Dana K

Notice how "K" appears at the top, then again at the bottom--the
"problem" you described.

Now what if each column was sorted independently:

Adam J
Adam K
Clive K
Dana Z

But this is saying Adam received award "J" -- which is not true!

Hope this helps!
 
B

BEOPS

Sorry for beeing unclear. Relating to your exempel I get this kind of result
for one specific value in Col A

Adam Ka
Adam Ka
Adam Kb
Adam Kb
Adam F
Adam F
Adam Ka
Adam Ka
Adam F
Adam F

This is what I mean with strange grouping and is not what I expect
 
B

BEOPS

--
BEO


smartin said:
There is nothing wrong; this is the way simultaneous sorting on multiple
columns is supposed to work. It keeps the related data on the same row.

Consider the following table showing employees and the the award(s) they
received:

A B
Name Award
Clive J
Dana K
Adam Z
Adam K

Now you want to sort, first by Name, then Award Code. The correct result is:

Adam K
Adam Z
Clive J
Dana K

Notice how "K" appears at the top, then again at the bottom--the
"problem" you described.

Now what if each column was sorted independently:

Adam J
Adam K
Clive K
Dana Z

But this is saying Adam received award "J" -- which is not true!

Hope this helps!
.
 
D

David Biddulph

You needed to select all the columns before you did your sort, then sort by
column A and column B.
If it stiull doesn't give the right result, you might want to produce
(temporarily) a helper column with =LEFT(B2) and copy down, to check that
you don't have leading spaces or other characyers which are confusing your
sort.
 
D

David Biddulph

.... and you might also want another helper column with =LEN(A2) and copy
down, to see whether all the "Adam" cells have only 4 characters, or whether
there are again spaces or other non-printing characters which are confusing
your sort.
 

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