+ Reply to Thread
Results 1 to 3 of 3

Sort Grouped Rows

  1. #1
    Registered User
    Join Date
    05-22-2013
    Location
    Ventura County, CA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    6

    Sort Grouped Rows

    I'm sorry if this question has already been answered. I've been searching for a solution to this problem and can't find anything that works. I also can't find an intelligible way to write the issue I'm having so if you need further clarification let me know.

    I have a workbook (Sort Test.xlsx) where multiple rows belong to the same "group". Is there a way to sort by a value (e.g. name of the test, date of the test, etc.) while maintaining the formatting and keeping the "groups" together? There are 3 sheets in the work book. The first shows the sheet as is, the other two are examples of how I would like to be able to sort the data.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Sort Grouped Rows

    Use Grouping!

    • Select rows 3 and 4
    • Data.Group.Group....(or SHIFT+ALT+Right_arrow)

    • Select rows 6 and 7 and group them
    • Select rows 9 and 10 and group them
    • Select rows 12 and 13 and group them

    Now...Click the [1] (in the upper left) to collapse the row groups

    • Select the data, including the headings
    • Home.Sort&Filter.Custom_Sort (Check: My data has headers...if necessary)
    ...Select the field to sort on Test/Date and do the sort

    Click the [2] (in the upper left) to expand the groups

    Each row group will have remained intact during the sort.

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    05-22-2013
    Location
    Ventura County, CA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    6

    Re: Sort Grouped Rows

    Thanks for the idea unfortunately it doesn't work for me. That's what I was originally trying, but I tried again using your steps exactly and it still doesn't work. It usually just doesn't sort at all although occasionally it will sort but won't keep the grouped data together (I can't make that happen again so I don't know what I'm doing differently). Is it possible I'm overlooking a setting or is there a different way to handle this?

    Thank you for the [1] and [2] trick for collapsing/expanding I never even realized that was there!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1