Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    3 Star Lounger
    Join Date
    May 2001
    Location
    Mount Vernon, Washington, USA
    Posts
    305
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sort Groups (2000 - 9.0.27)

    How can I sort rows by the column reference, yet keeping groups together? I have grouped rows together and then did a sort by the column contents, but the groups do not stay together. Any way to do this???? <img src=/S/crazy.gif border=0 alt=crazy width=15 height=15>
    lynndelap

  2. #2
    3 Star Lounger
    Join Date
    May 2002
    Location
    Mpls, Minnesota, USA
    Posts
    271
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sort Groups (2000 - 9.0.27)

    Delap,
    Add a column where you assign a group code and make sure the column is included in the data sort. Sort by Group, then by the other columns you want.

    Chuck
    Chuck Reimer
    I'm from the Government and I'm here to help...

  3. #3
    3 Star Lounger
    Join Date
    May 2001
    Location
    Mount Vernon, Washington, USA
    Posts
    305
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sort Groups (2000 - 9.0.27)

    I did this already and it will sort fine on the first column reference but the second column does not sort according to number, they are scrambled and not in any order????????????????? Frustrated.
    lynndelap

  4. #4
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sort Groups (2000 - 9.0.27)

    Can you upload an example workbook?
    Legare Coleman

  5. #5
    3 Star Lounger
    Join Date
    May 2001
    Location
    Mount Vernon, Washington, USA
    Posts
    305
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sort Groups (2000 - 9.0.27)

    I will try - have never done this before - uploading. May need help. Here it goes...
    lynndelap

  6. #6
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,832
    Thanks
    136
    Thanked 484 Times in 461 Posts

    Re: Sort Groups (2000 - 9.0.27)

    The cells in your column 'H. P.' are formatted as 'Text' so they won't sort numerically.

    zeddy

  7. #7
    3 Star Lounger
    Join Date
    May 2001
    Location
    Mount Vernon, Washington, USA
    Posts
    305
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sort Groups (2000 - 9.0.27)

    Thank you so much - I didn't create this form a colleague did so I didn't even look at that!
    lynndelap

  8. #8
    3 Star Lounger
    Join Date
    May 2001
    Location
    Mount Vernon, Washington, USA
    Posts
    305
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sort Groups (2000 - 9.0.27)

    Changed it to numbers and it still didn't work! Ughh <img src=/S/confused.gif border=0 alt=confused width=15 height=20>
    lynndelap

  9. #9
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Sort Groups (2000 - 9.0.27)

    Since everything in B is Unique (except for the blanks), sorting by B first will eliminate any sorting in the other columns since there is NO need for a tie-breaker. I don't understand what you are after.

    Are you trying to keep the blanks with the other cells? Are you trying to "group" based on B: If so each group should have a UNIQUE designation, not every row. [B2-B4 = "Res"], [B5-B7 = "P"], [B8-10 = "Br"], etc Then they will stay grouped and use colu E as a secondary sort. You don't need a secondary sort for most of them since they are ALL different!

    Steve

  10. #10
    3 Star Lounger
    Join Date
    May 2002
    Location
    Mpls, Minnesota, USA
    Posts
    271
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sort Groups (2000 - 9.0.27)

    delap,

    Take a look at the attached to see if it is what you are looking for.

    Chuck
    Chuck Reimer
    I'm from the Government and I'm here to help...

  11. #11
    3 Star Lounger
    Join Date
    May 2001
    Location
    Mount Vernon, Washington, USA
    Posts
    305
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sort Groups (2000 - 9.0.27)

    No. I would like to be able to sort on column "B" to keep all the areas together and then the figures within column "E" noted "HP" I would like to sort from highest to lowest (These represent Horse Power). I can get the primary sort in column "B" fine, but then the numbers within column "E" do not sort from high to low. Do I need to do this in Access? It seems like this should work???
    lynndelap

  12. #12
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Sort Groups (2000 - 9.0.27)

    Your sort is doing what you "ASK", (maybe not what you want).

    As I pointed out earlier <post#=263598>post 263598</post#>, you need to change column B (or add a new column for grouping) so they are NOT all unique. If they are unique there is no tie breaker

    In pumps since P1<P2 it DOESN'T matter that 3<10!
    If you want to "group" you need to make a GROUP column that just puts a group value in so it can sort on that FIRST and then look at HP for the Ties

    Steve

  13. #13
    3 Star Lounger
    Join Date
    May 2001
    Location
    Mount Vernon, Washington, USA
    Posts
    305
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sort Groups (2000 - 9.0.27)

    Steve,

    Can you expand on what you mean by being "unique" sorry, I am not real knowledgeable in this area.
    lynndelap

  14. #14
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Sort Groups (2000 - 9.0.27)

    Take a look at the table below. The "Unique" is your col B. If you sort on this it doesn't much matter what is in any of the columns, None of these (other than the blanks) are different. If you want to GROUP the sections, give them a GROUP name something like the "Not unique column" in my table. When this is the primary key, all the items that are the SAME, will be kept together and excel will then use the secondary sort to differentiate them. If the prim key AND the Sec key ar the same then it will go to the Tertiary key.

    If you want the Groups sorted a particular way, you might want to add something to keep them sorted in a particular order(for example):
    "1) Res" instead of "Res"
    "2) P" instead of "P"
    etc
    and it will then group and sort in this order.

    Steve
    <table border=1><td valign=bottom>Unique</td><td align=center valign=bottom>Not Unique</td><td align=center valign=bottom>RES - 1</td><td align=center valign=bottom>Res</td><td align=center valign=bottom>RES - 2</td><td align=center valign=bottom>Res</td><td align=center valign=bottom> </td><td align=center valign=bottom>Res</td><td align=center valign=bottom>P - 1</td><td align=center valign=bottom>P</td><td align=center valign=bottom>P - 2</td><td align=center valign=bottom>P</td><td align=center valign=bottom> </td><td align=center valign=bottom>P</td><td align=center valign=bottom>BR - 1</td><td align=center valign=bottom>BR</td><td align=center valign=bottom>BR - 2</td><td align=center valign=bottom>BR</td><td align=center valign=bottom>BR - 3</td><td align=center valign=bottom>BR</td><td align=center valign=bottom> </td><td align=center valign=bottom>BR</td><td align=center valign=bottom>105</td><td align=center valign=bottom>100</td><td align=center valign=bottom>110</td><td align=center valign=bottom>100</td><td align=center valign=bottom>115</td><td align=center valign=bottom>100</td><td align=center valign=bottom>120</td><td align=center valign=bottom>100</td><td align=center valign=bottom> </td><td align=center valign=bottom>100</td><td align=center valign=bottom>330</td><td align=center valign=bottom>300</td><td align=center valign=bottom> </td><td align=center valign=bottom>300</td><td align=center valign=bottom>405</td><td align=center valign=bottom>400</td><td align=center valign=bottom>410</td><td align=center valign=bottom>400</td><td align=center valign=bottom>415</td><td align=center valign=bottom>400</td><td align=center valign=bottom>420</td><td align=center valign=bottom>400</td><td align=center valign=bottom>425</td><td align=center valign=bottom>400</td><td align=center valign=bottom>430</td><td align=center valign=bottom>400</td><td align=center valign=bottom>435</td><td align=center valign=bottom>400</td></table>

  15. #15
    3 Star Lounger
    Join Date
    May 2002
    Location
    Mpls, Minnesota, USA
    Posts
    271
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sort Groups (2000 - 9.0.27)

    Steve,

    Take a look at the workbook I attached in post 263639. I assigned group numbers that would keep the group together and the user could then do the second level sort on another column (with the groups staying together). Many of the entries of the original workbook were numbers that were really text (I fixed that in mine).

    delap When sorting -If you wish to keep groups together, all entries in the group have to have the same code -for example Area100 or Area200. Then when that column is used for the top level sort, all Area100's are kept together but sorted within the group by what you used for the second level sort (like H.P.). Take another look at the wortkbook I sent and do the sorts on the tab named Book1Modified. See if that works for you.

    Chuck
    Chuck Reimer
    I'm from the Government and I'm here to help...

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •