Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Can I use a value to set the range of a SUM (i.e. SUM cell B5 and.
My variable is "# of weeks" and if I set it to "6", I want the formula to sum
the values from cell B5 down 6 entries. Or if I set it to "5", I want it to sum the values from B5 down 5 entries....etc... |
#2
|
|||
|
|||
Assume the variable is in cell A1
=SUM($B$5:INDEX($B$5:$B$1000,A1)) it's better to use index instead of offset or indirect since it is not volatile -- Regards, Peo Sjoblom "Dynamic Sum Ranger" <Dynamic Sum wrote in message ... My variable is "# of weeks" and if I set it to "6", I want the formula to sum the values from cell B5 down 6 entries. Or if I set it to "5", I want it to sum the values from B5 down 5 entries....etc... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Passing a range name as an argument to the Index Function | Excel Discussion (Misc queries) | |||
ClearContents method on a passed range | New Users to Excel | |||
Defined range difficulty | Excel Discussion (Misc queries) | |||
named range refers to: in a chart | Excel Discussion (Misc queries) | |||
range names | Excel Worksheet Functions |