Summations

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hello Last night I was asking about Summations using
variables. You gave me the answer below. This works great
thank you - just one more thing - is it possible to use
this method without placing the $ in the formula.

Thank you very much






you've got all the pieces it seems, just put them
together...
use your range assignment to assign an address to a
variable, and then
insert the variable into a formula

like so:

targetcell = "A1"


cell2 = range(activecell.offset(0,-10),selection.end
(xltoright)).Address

range(targetcell).formula = "=sum(a1:" & cell2 & ")"


Message posted
 
Hi
change
cell2 = range(activecell.offset(0,-10),selection.end
(xltoright)).Address

to
cell2 = range(activecell.offset(0,-10),selection.end
(xltoright)).Address(0,0)
 
Back
Top