I want to insert a formula dynamically into a cell in an excel sheet. I am using the following line of code
ActiveCell.FormulaR1C1 = "=Subtotal(2, D2:A" & FinalRow & ")"
However in the excel sheet it includes qoutes like this
=SUBTOTAL(2, 'D2':'A256')
Does anyone now how to insert a formula like this correctly
Regards
padraigmc
ActiveCell.FormulaR1C1 = "=Subtotal(2, D2:A" & FinalRow & ")"
However in the excel sheet it includes qoutes like this
=SUBTOTAL(2, 'D2':'A256')
Does anyone now how to insert a formula like this correctly
Regards
padraigmc