LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.misc
tom tom is offline
external usenet poster
 
Posts: 570
Default Variable row groupings

Thanks for the help. I'm not too sure it's what I need.
I'm not familiar with INDIRECT but here's what I tried and got a syntax error.
=SUM("RawData!C"&"2":"RawData!C"&$Z$1+1)
RawData!C2 is the location of the START of the data to be SUM'd
$Z$1 = the number of rows I'd like to sum (for this example it's =4)
RawData!C$Z$1+1 should be = 5
In theory, once I copy the above formula (=SUM("RawData....), Excel should
continue to increment from Row 2 to Row 3... and from Row Z$1+1 to Row Z$1+2
etc.
So, for the first cell Excel would provide =SUM(RawData!C2:RawData!C5) then
=SUM(RawData!C3:RawData!C6) .... for $Z$1=4.
For $Z$1=10, I'd have =Sum(RawData!C2:RawData!C11) then
=SUM(RawData!C3:RawData!C12)...
Maybe I just need a boost on how to do that. Maybe my description wasn't
clear and clean enough.
Thanks!


"Mike H" wrote:

Hi,

Reading it again perhaps it's this you want

=SUM(INDIRECT("H" & ROW(A2) & ":H" & $A$1+ROW(A1)))

Mike

"Mike H" wrote:

Hi,

That's a lot of words and if I've understood them correctly, try this

=SUM(INDIRECT("A2:A"&A1+1))


Mike

"Tom" wrote:

Excel 2003 SP3
I have a need to perform an arithmetic expression on a set of rows based
upon the value for the number of rows to be operated on in A1. For example,
I'd like to SUM() the numeric values in Column $H for all rows in groups of
four when "N=4" in A1. This is normally done via SUM($H2:$H5) which sums the
group of cell entries from H2 through and including H5. My task is to
develop a formula such that I can vary what's in A1 from 4 to 10 or whatever
so that I don't have to manually change the SUM() function each time I change
the A1 value.
For example, if I have "N=4" in A1 and it to change "N=10" then the SUM()
function would automatically change from SUM($H2:$H5) to SUM($H2:$H11) for
the first value to be displayed and then SUM($H3:$H6) to SUM($H3:$H12) etc on
down for approximately 2500+ rows.
The formula would look something like SUM($H(Row(I-(N+1):$HRow(I)), where
I=ROW() [current row #], N is the value in A1. The above produces an error.
I need a jump start on determining variable rows in a formula.
I would probably need something like IF(ROW()-Value(A1)<1,"",put calculation
here) so that when the generated value for current row minus the N= value is
<1 I just produce a blank (null) in the cell.
TIA

 
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
Cell Groupings J. Glynn Excel Worksheet Functions 2 January 27th 09 06:13 PM
Groupings in a scattergraph Bee Charts and Charting in Excel 2 August 14th 07 03:06 AM
Excel should allow tab groupings. Bassam Abdul-Baki Excel Discussion (Misc queries) 11 June 3rd 06 07:04 AM
Subtotals/Groupings Gary Excel Worksheet Functions 0 May 9th 06 12:52 PM
Groupings within PivotTables Fred Excel Worksheet Functions 1 October 18th 05 11:45 PM


All times are GMT +1. The time now is 02:27 AM.

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

About Us

"It's about Microsoft Excel"