ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   More columne sorting (https://www.excelbanter.com/excel-worksheet-functions/246484-more-columne-sorting.html)

BEOPS

More columne sorting
 
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

smartin

More columne sorting
 
BEOPS wrote:
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!

BEOPS

More columne sorting
 
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

--
BEO


"smartin" wrote:

BEOPS wrote:
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!
.


BEOPS

More columne sorting
 

--
BEO


"smartin" wrote:

BEOPS wrote:
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!
.


David Biddulph[_2_]

More columne sorting
 
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.
--
David Biddulph

"BEOPS" wrote in message
...
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

--
BEO


"smartin" wrote:

BEOPS wrote:
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!
.




David Biddulph[_2_]

More columne sorting
 
.... 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.
--
David Biddulph

"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
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.
--
David Biddulph

"BEOPS" wrote in message
...
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

--
BEO


"smartin" wrote:

BEOPS wrote:
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!
.







All times are GMT +1. The time now is 12:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com