Closed Thread
Results 1 to 3 of 3

How to sort by grouped rows

  1. #1
    Mike
    Guest

    How to sort by grouped rows

    I have several groupings of rows and I wish to sort these groupings based on
    the cell value in one cell in each grouping. How can this be done?

    For example... rows 1 & 2 are grouped and rows 3 & 4 are grouped, if I wish
    to sort these grouped rows by the cell value in C2 (= 6) in the first group
    and cell value C4 (= 7) in the second group without changing the groupings,
    how would I do this? The values in column C are equations, i.e., C1 = A1 + B1

    A B C
    1 2 2 4
    2 3 8 11
    3 1 2 3
    4 3 4 7

  2. #2
    Mike
    Guest

    RE: How to sort by grouped rows

    Oops, C2 actually equals 11, not 6.

    "Mike" wrote:

    > I have several groupings of rows and I wish to sort these groupings based on
    > the cell value in one cell in each grouping. How can this be done?
    >
    > For example... rows 1 & 2 are grouped and rows 3 & 4 are grouped, if I wish
    > to sort these grouped rows by the cell value in C2 (= 6) in the first group
    > and cell value C4 (= 7) in the second group without changing the groupings,
    > how would I do this? The values in column C are equations, i.e., C1 = A1 + B1
    >
    > A B C
    > 1 2 2 4
    > 2 3 8 11
    > 3 1 2 3
    > 4 3 4 7


  3. #3
    Jay
    Guest

    Re: How to sort by grouped rows

    > I have several groupings of rows and I wish to sort these groupings
    > based on the cell value in one cell in each grouping. How can this be
    > done?
    >
    > For example... rows 1 & 2 are grouped and rows 3 & 4 are grouped, if I
    > wish to sort these grouped rows by the cell value in C2 (= 11) in the
    > first group and cell value C4 (= 7) in the second group without
    > changing the groupings, how would I do this? The values in column C
    > are equations, i.e., C1 = A1 + B1
    >
    > A B C
    > 1 2 2 4
    > 2 3 8 11
    > 3 1 2 3
    > 4 3 4 7


    > Oops, C2 actually equals 11, not 6.


    One way is to use D and E as helper columns. Put the following in D1 and
    copy down:
    =IF(MOD(ROW(),2)=0,C1,C2)

    Put the following in E1 and copy down:
    =ROW()

    Then select everything and sort on column D then E.

    You can hide the helpers before printing or disseminating the file.

Closed 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