entering formula using variable in Excel Macro

D

doc-s

Trying to use following in excel Macro and it will not
work. Any help????

ActiveCell.Formula = "=SUBTOTAL(9,P & rowval -1: P &
rowval1)"


where P is column and rowval -1 is current row -1 and
rowval1 are variables.
 
Top