this is what I'm trying to do.
startD = 5
endD = 1
DateD = startD - endD
ActiveCell.FormulaR1C1 = "=SUM(RC[XXXXXX]:RC[-1])"
How do I get "DateD" in place of the "XXXXX" and have it work?
Printable View
this is what I'm trying to do.
startD = 5
endD = 1
DateD = startD - endD
ActiveCell.FormulaR1C1 = "=SUM(RC[XXXXXX]:RC[-1])"
How do I get "DateD" in place of the "XXXXX" and have it work?
got it
DateD = (startD - endD) + 1
ActiveCell.FormulaR1C1 = "=SUM(RC[-" & DateD & "]:RC[-1])"