Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Stephanie
 
Posts: n/a
Default Can I group data on different rows together and then sort the grou

I am looking for a way to be able to group data on subsequent rows together
and then sort those groups into a list. My data looks something like this:

(Column 1) (2) (3) (4) (5)
Smith, Joe 1 2 3 A
5 6 B

Doe, John 1 2 3 A
5 6 B

Doe, Jane 1 2 3 B
6 5 A
7 8 9

I need to be able to group each "person" in column 1 together with the data
in the next 4 columns and following rows. Then I need to sort the groups so
that every "person" with a "3" in the 4th column together. See what I mean?
Can I do this and if I can, how?
Thanks!

  #2   Report Post  
CLR
 
Posts: n/a
Default

I do this sort of thing with a helper column, insert "SmithJoe101 for the
first row and SmithJoe102 for the second row, etc etc.......then DoeJohn101,
DoeJohn102, etc etc...........then sort on that column

Vaya con Dios,
Chuck, CABGx3



"Stephanie" wrote:

I am looking for a way to be able to group data on subsequent rows together
and then sort those groups into a list. My data looks something like this:

(Column 1) (2) (3) (4) (5)
Smith, Joe 1 2 3 A
5 6 B

Doe, John 1 2 3 A
5 6 B

Doe, Jane 1 2 3 B
6 5 A
7 8 9

I need to be able to group each "person" in column 1 together with the data
in the next 4 columns and following rows. Then I need to sort the groups so
that every "person" with a "3" in the 4th column together. See what I mean?
Can I do this and if I can, how?
Thanks!

  #3   Report Post  
Stephanie
 
Posts: n/a
Default

That would help, however I have about 90 pages/10 people per page/ to do
that! That would take forever, but thank you for the idea!

"CLR" wrote:

I do this sort of thing with a helper column, insert "SmithJoe101 for the
first row and SmithJoe102 for the second row, etc etc.......then DoeJohn101,
DoeJohn102, etc etc...........then sort on that column

Vaya con Dios,
Chuck, CABGx3



"Stephanie" wrote:

I am looking for a way to be able to group data on subsequent rows together
and then sort those groups into a list. My data looks something like this:

(Column 1) (2) (3) (4) (5)
Smith, Joe 1 2 3 A
5 6 B

Doe, John 1 2 3 A
5 6 B

Doe, Jane 1 2 3 B
6 5 A
7 8 9

I need to be able to group each "person" in column 1 together with the data
in the next 4 columns and following rows. Then I need to sort the groups so
that every "person" with a "3" in the 4th column together. See what I mean?
Can I do this and if I can, how?
Thanks!

  #4   Report Post  
William Horton
 
Posts: n/a
Default

I'm not sure that I completely understand you question correclty but you
could try playing with pivot tables to do what you want. However, the name
in column 1 would have to be on every line that name is associated with. You
could write a short macro to do it though if you have 90 pages worth. It
would look like the below:

Sub InsertName()
Dim Cell As Range
For Each Cell In ThisWorkbook.ActiveSheet.Range("A1:A1000").Cells
If Cell.Value = "" Then
Cell.Value = Cell.Offset(-1, 0).Value
End If
Next Cell
End Sub

Substitute the range of names in place of A1:A1000. Ensure you place the
macro in the workbook that the names are in and that you run it from the
worksheet you want it to run on (or adjust the macro accordingly).

Make a copy of your workbook before you try this.

Hope this helps.

Bill Horton

"Stephanie" wrote:

I am looking for a way to be able to group data on subsequent rows together
and then sort those groups into a list. My data looks something like this:

(Column 1) (2) (3) (4) (5)
Smith, Joe 1 2 3 A
5 6 B

Doe, John 1 2 3 A
5 6 B

Doe, Jane 1 2 3 B
6 5 A
7 8 9

I need to be able to group each "person" in column 1 together with the data
in the next 4 columns and following rows. Then I need to sort the groups so
that every "person" with a "3" in the 4th column together. See what I mean?
Can I do this and if I can, how?
Thanks!

  #5   Report Post  
CLR
 
Posts: n/a
Default

Populating the columns could be speeded up of course using CONCATENATION and
copy-down, and the sequential suffix need not re-start with 1 or 101 each
time, the only requirement is that each successive line is higher than the
previous line....."SmithJoe101 for the first row and SmithJoe102 for the
second row, etc etc.......then DoeJohn87105, DoeJohn87106, etc etc will work
just as well............the number only comes into play after the
alphabetical sorting of the name..

Vaya con Dios,
Chuck, CABGx3



"Stephanie" wrote:

That would help, however I have about 90 pages/10 people per page/ to do
that! That would take forever, but thank you for the idea!

"CLR" wrote:

I do this sort of thing with a helper column, insert "SmithJoe101 for the
first row and SmithJoe102 for the second row, etc etc.......then DoeJohn101,
DoeJohn102, etc etc...........then sort on that column

Vaya con Dios,
Chuck, CABGx3



"Stephanie" wrote:

I am looking for a way to be able to group data on subsequent rows together
and then sort those groups into a list. My data looks something like this:

(Column 1) (2) (3) (4) (5)
Smith, Joe 1 2 3 A
5 6 B

Doe, John 1 2 3 A
5 6 B

Doe, Jane 1 2 3 B
6 5 A
7 8 9

I need to be able to group each "person" in column 1 together with the data
in the next 4 columns and following rows. Then I need to sort the groups so
that every "person" with a "3" in the 4th column together. See what I mean?
Can I do this and if I can, how?
Thanks!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"