How would I write a vba function to sum a changing range in Excel?
So that I could call the function anywere in my spreadsheet and it would sum up to the first blank line. I was tring to use
.FormulaR1C1 = "sum(" _
& Range(.Offset(-1, 0), .Offset(-1, 0).End(xlUp)) _
.Address(False, False, xlR1C1,activecel"
"
But I get an error.
thanks
Liz
So that I could call the function anywere in my spreadsheet and it would sum up to the first blank line. I was tring to use
.FormulaR1C1 = "sum(" _
& Range(.Offset(-1, 0), .Offset(-1, 0).End(xlUp)) _
.Address(False, False, xlR1C1,activecel"
But I get an error.
thanks
Liz