Dear Experts,
I've a problem to sum up a variable range of cells, and would like your advice on how to modify the following codes.
Thx so much.
Edward
I've a problem to sum up a variable range of cells, and would like your advice on how to modify the following codes.
Thx so much.
Edward
Code:
Dim SumFirstCell
Dim SumLastCell
Application.Goto Reference:="TotalToDate"
ActiveCell.Offset(1, 3).Range("A1").Select
SumFirstCell = ActiveCell.Address
Selection.End(xlToRight).Select
SumLastCell = ActiveCell.Address
Application.Goto Reference:="TotalToDate"
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.FormulaR1C1 = "=+SUM(SumFirstCell:SumLastCell)"