I’m summing a list of sales by customer code , policy count, sales amount in $ & commission amount in $. The numbers of sales vary by salesperson so I need to sum a varying sized range. I thought that the R1C1 notation method would be best. However, I can only input the formula in the cell and I prefer inputting just the value of the range (not the formula).
[more code goes here…]
c = count of sales
‘Insert Total & Sum
PrtRng.Offset(c + 1, 0) = "Totals"
PrtRng.Offset(c + 1, 1).Formula = Application.Sum(Range(Cells(x + 1, 2), Cells(c + 1, 2))) 'this works, but not R1C1 notation
PrtRng.Offset(c + 1, 1).FormulaR1C1 = "=Sum(R[-6]c:R[-1]C)" 'inputs the Formula in cell, Not the value
'PrtRng.Offset(c + 1, 1).FormulaR1C1 = Sum(R[-6]c:R[-1],C) '= Compile error: Expected: list separator or )
My question is can I input the value of the sum using R1C1 notation? If so, how? Thanks for your help
[more code goes here…]
c = count of sales
‘Insert Total & Sum
PrtRng.Offset(c + 1, 0) = "Totals"
PrtRng.Offset(c + 1, 1).Formula = Application.Sum(Range(Cells(x + 1, 2), Cells(c + 1, 2))) 'this works, but not R1C1 notation
PrtRng.Offset(c + 1, 1).FormulaR1C1 = "=Sum(R[-6]c:R[-1]C)" 'inputs the Formula in cell, Not the value
'PrtRng.Offset(c + 1, 1).FormulaR1C1 = Sum(R[-6]c:R[-1],C) '= Compile error: Expected: list separator or )
My question is can I input the value of the sum using R1C1 notation? If so, how? Thanks for your help