I am trying to enter the following formula using VBA
"=SUM(IF(FREQUENCY(IF
('Array Summary'!$A$3:$A$" & LastRow & "=$A$1,IF
('Array Summary'!$B$3:$B$" & LastRow & "=$H$13,IF
('Array Summary'!$E$3:$E$" & LastRow & "<>"""",IF
('Array Summary'!$K$3:$K$" & LastRow & "=$H$12,IF
('Array Summary'!$L$3:$L$" & LastRow & "=I12,IF
('Array Summary'!$O$3:$O$" & LastRow & "<>""Commvault"",MATCH
('Array Summary'!$E$3:$E$" & LastRow & ",'Array Summary'!$E$3:$E$" & LastRow & ",0))))))),ROW
('Array Summary'!$E$3:$E$" & LastRow & ")-ROW('Array Summary'!E3)+1),1))"
I have tried drastically reducing the formula to something like below, to then use replace
"=SUM(IF(FREQUENCY(IF(A1:A2=$A$1,
IF(B1:B2=$H$13,
IF(E1:E2<>"""",
IF(K1:K2=$H$12,
IF(L1:L2=I12,
IF(O1:O2<>""Commvault"",
MATCH(E1:E2,E1:E2,0))))))),
ROW(E1:E2)-ROW(E6)+1),1))"
But I can't get that formula added in via VBA, if I remove one of the IF statements VBA adds it in fine, however I then can't get replace to work
Any help anyone can give me is greatly appreciated