After I have selected a range containing numerical values, I want to enter through VBA the formula =SUM
at the bottom of each column, that is, in the row after the last row selected. For each column, it must summarize all the values โโin the corresponding column of the entire selection.
How can i do this?
I am currently using the code specified by the macro recorder: ActiveCell.FormulaR1C1 = "=SUM(R[-10]C:R[-1]C)"
. The problem is that when my range becomes more than 10 rows, it will not accept rows above bottom 10.
source share