View Single Post
  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

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