+ Reply to Thread
Results 1 to 6 of 6

Sorting groups of rows

Hybrid View

  1. #1
    Registered User
    Join Date
    03-13-2008
    Posts
    3

    Sorting groups of rows

    I have a spreadsheet containing groups of rows with multiple columns in Excel 2002 Each or these groups of rows & columns contain descriptors of a certain item. Each group is also the same number of rows and columns and the data in each cell within the rows & columns for a group is structured in a similar fashion from grouping to grouping.

    I'd like to be able to sort by a group of rows based on certain criteria. I know the first thing someone is going to suggest is to put this into a database, but I can't go down that path yet. So, I'm wondering if there is anyway to tell Excel how to do this sorting by groups.

    Any ideas?

  2. #2
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    199
    I am not sure that I completely follow the question that you have. From your post I am assuming that you have data grouped together (Data > Group and Outline > Group) on your worksheet. Then, where I am getting lost is do you want to sort the entire group from one section to another within the worksheet, or just the data that is housed in the grouped section of the worksheet?

    So, say you have 3 grouped sections of 10 rows each. Do you want to sort each 10 row section which could move the third group to the first and first to second and second to third (theoretically)?

    Or, do you want to take and sort the rows within each grouped section and sort only the 10 rows that are grouped together?

    Also, what are you sorting them by? Is it a value within one of the columns, or are you you wanting to sort left to right?

  3. #3
    Registered User
    Join Date
    03-13-2008
    Posts
    3
    Quote Originally Posted by Claymation
    So, say you have 3 grouped sections of 10 rows each. Do you want to sort each 10 row section which could move the third group to the first and first to second and second to third (theoretically)?

    Also, what are you sorting them by? Is it a value within one of the columns, or are you you wanting to sort left to right?
    Thanks for the reply. I am looking to do exactly what you state above. In your example, I want to sort the 3 grouped sections of 10 rows each such that, depending upon the value in a specific cell, group 3, as you say, might be resorted to become the 1st group.

    Per your second question, I am looking to sort by a value in one of the columns. The cell containing that value to sort by will be in the same relative position in each of the "grouped" rows. For example, if I have 3 groups of rows that I want to sort and each group consists, the cell (or cells) that I want to sort by will be in the same position of each group.

    Does that help you to understand what I'm looking to do?

    Thanks.

  4. #4
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    199
    That does make sense, unfortulately I am not sure how that would be done. I am assuming that there is a way to do it using VBA, but that is beyond my current capabilities.

  5. #5
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    If you could post a redacted sample of your sheet and how you want it sorted, it would help. VBA may be nessesary to achieve what you want.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  6. #6
    Registered User
    Join Date
    03-13-2008
    Posts
    3
    Quote Originally Posted by mikerickson
    If you could post a redacted sample of your sheet and how you want it sorted, it would help. VBA may be nessesary to achieve what you want.
    Thanks for your interest. Attached is a zip file of a portion of the actual file I want to sort. It's a list of projects. I'd like to sort the grouped rows by either or both the Project Name and the Project Sponsor cells. (These rows are not technically "grouped" from an Excel perspective. Rather, to be clear, each "project" in the list has a consistant number of rows that are used to describe the project and are considered a logical grouping.)

    Any suggestions?

    thanks again
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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