Hi,
I’m trying to use a macro to paste the following formula (kindly supplied by Alkey in a previous post) i.e.
=SUMPRODUCT(--(P2:P1000="Met"),SUBTOTAL(103,OFFSET(P2:P1000,ROW(P2:P1000)-MIN(ROW(P2:P1000)),0,1)))
into a cell ’V1’ but I keep getting the error message :-
Compile error
Expected: end of statement
The syntax I am using is :-
Range("V1").Formula = "=SUMPRODUCT(--(P2:P1000="Met"),SUBTOTAL(103,OFFSET(P2:P1000,ROW(P2:P1000)-MIN(ROW(P2:P1000)),0,1)))"
Any assistance would be greatly revived
Many thanks in advance
Regards
rob
Bookmarks