I have a set I am trying to dynamically sum. For instance I know my column is varCol and the number of rows is varRow. This is what I am have coded:
'This is where I want the formula
Range(Cells((varNumRow + 1), varColNum), Cells((varNumRow + 1), varColNum)).Select
'I want to sum everything above that column to row 2, row one is headers
ActiveCell.FormulaR1C1 = "=SUM(R[-" & varNumRow & "]C:R[-1]C)"
and I get an error...any suggestions?
'This is where I want the formula
Range(Cells((varNumRow + 1), varColNum), Cells((varNumRow + 1), varColNum)).Select
'I want to sum everything above that column to row 2, row one is headers
ActiveCell.FormulaR1C1 = "=SUM(R[-" & varNumRow & "]C:R[-1]C)"
and I get an error...any suggestions?