locked
Sorting "Grouped" Excel Rows RRS feed

  • Question

  • Hello...

         I was wondering if it's possible to sort "Grouped" Excel Rows in order to maintain the integrity of the rows in a group, (Keep them together).

         I have something similar to the following...

    Row 1:  1.Name, Address, Phone, Start Date1

    Row 2:  1.Date1, Date2, Date3

    Row 3:  1.Location1, Location2, Location3

    Row 4:  2.Name2, Address2, Phone2, Start Date2

    Row 5:  2.Date1, Date2, Date3

    Row 6:  2.Location1, Location2, Location3

    Ad infinitum

    Can I sort the Rows by say "Start Date" in Row 1 and 4; yet keep Rows 1,2,&3 along with Rows 4,5&6 together after the sort ?

    I've tried using sorting by using "Start Date" as 1st Sort Criteria, then "Column1" as 2nd Sort Criteria; but the rows continue to get sorted as "Ungrouped".

    Thank You !

    Ed VA

     

    • Moved by William Zhou CHN Monday, August 22, 2011 4:51 AM (From:Visio General Questions and Answers for IT Professionals)
    Wednesday, August 17, 2011 1:55 PM

Answers

  • Bonsour®

    "edv7028" a écrit
        I was wondering if it's possible to sort "Grouped" Excel Rows in order to
    maintain the integrity of the rows in a group, (Keep them together).
         I have something similar to the following...

    Row 1:  1.Name, Address, Phone, Start Date1

    Row 2:  1.Date1, Date2, Date3

    Row 3:  1.Location1, Location2, Location3

    Row 4:  2.Name2, Address2, Phone2, Start Date2

    Row 5:  2.Date1, Date2, Date3

    Row 6:  2.Location1, Location2, Location3

    Ad infinitum

    Can I sort the Rows by say "Start Date" in Row 1 and 4; yet keep Rows 1,2,&3
    along with Rows 4,5&6 together after the sort ?

    I've tried using sorting by using "Start Date" as 1st Sort Criteria, then
    "Column1" as 2nd Sort Criteria; but the rows continue to get sorted as
    "Ungrouped".
    ====================================
    You have to use two dummy columns
    Firts of all , copy E1 in F1
    in G1 type :  1

    in E2 use this formula : = IF(E2="",E1,E2)
    in G2 use this formula : =ROW()

    select E2:G2 , copy down this formulas  as requested
    for all this new range copy paste spécial value

    now you may sort by 1st criteria column 5 then 2nd criteria column 6

    sort back by using only criteria column 6

    HTH


    Maude Este
    Monday, August 22, 2011 8:50 AM

All replies

  • Hi

     

    Thank you for using Microsoft Office for IT Professionals Forums.

     

    From your description, I have reproduced in Excel 2003/2007/2010.

    But unfortunately, Excel did not have directly option to carry out.

    It might be use code for Marco to sort specific resource.  we have MSDN forum for codes related issue

    You can post your question to Excel for developer for further help”

    http://social.msdn.microsoft.com/Forums/en/exceldev/threads

    Thank you for your understanding and support.

     

    Sincerely

    William Zhou

    --------------------------------------------------------------------------------

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Monday, August 22, 2011 3:41 AM
  • Bonsour®

    "edv7028" a écrit
        I was wondering if it's possible to sort "Grouped" Excel Rows in order to
    maintain the integrity of the rows in a group, (Keep them together).
         I have something similar to the following...

    Row 1:  1.Name, Address, Phone, Start Date1

    Row 2:  1.Date1, Date2, Date3

    Row 3:  1.Location1, Location2, Location3

    Row 4:  2.Name2, Address2, Phone2, Start Date2

    Row 5:  2.Date1, Date2, Date3

    Row 6:  2.Location1, Location2, Location3

    Ad infinitum

    Can I sort the Rows by say "Start Date" in Row 1 and 4; yet keep Rows 1,2,&3
    along with Rows 4,5&6 together after the sort ?

    I've tried using sorting by using "Start Date" as 1st Sort Criteria, then
    "Column1" as 2nd Sort Criteria; but the rows continue to get sorted as
    "Ungrouped".
    ====================================
    You have to use two dummy columns
    Firts of all , copy E1 in F1
    in G1 type :  1

    in E2 use this formula : = IF(E2="",E1,E2)
    in G2 use this formula : =ROW()

    select E2:G2 , copy down this formulas  as requested
    for all this new range copy paste spécial value

    now you may sort by 1st criteria column 5 then 2nd criteria column 6

    sort back by using only criteria column 6

    HTH


    Maude Este
    Monday, August 22, 2011 8:50 AM
  • Thank You ! & Merci !  

     I'll give it a try at the next opportunity.


    edv7028
    Friday, September 9, 2011 1:24 PM