View Single Post
  #3   Report Post  
Jay
 
Posts: n/a
Default

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.