Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mike
 
Posts: n/a
Default 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   Report Post  
Mike
 
Posts: n/a
Default

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   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.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Worksheet protection with grouped rows? pmw5 Excel Worksheet Functions 7 July 17th 07 04:49 PM
How do I sort rows with hyperlinks? SKTAZZ Excel Discussion (Misc queries) 1 March 16th 05 06:00 PM
Numbering of Grouped Rows Phil Excel Discussion (Misc queries) 2 February 1st 05 12:38 AM
How to use outline data (grouped rows) in a protected worksheet? biometris Excel Discussion (Misc queries) 0 January 17th 05 10:47 AM
Why have I got some repeating rows after a Excel 2003 sort Jayne Excel Discussion (Misc queries) 1 January 6th 05 06:34 PM


All times are GMT +1. The time now is 09:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"