Can I use a value to set the range of a SUM (i.e. SUM cell B5 and.

D

Dynamic Sum Ranger

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...
 
P

Peo Sjoblom

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
 
Top