I need to input a formula into a macro but I get
Application-defined or object-defined error
The formula is
=SUMIFS(FBL5N!O:O,FBL5N!D:D,Y1120_CREDIT!B6,FBL5N!S:S,{"<>0","<>3","<>9","<>O","<>D"})
I have this in the code
Range("P6").Formula = "=SUMIFS(FBL5N!O:O,FBL5N!D:D,Y1120_CREDIT!B6,FBL5N!S:S,{" & "<>0" & "," & "<>3" & "," & "<>9" & "," & "<>O" & "," & "<>D" & "})"
I have tried putting quotations in different ways and still with the same result.
Just double all your quotes in the string:
Range("P6").Formula = "=SUMIFS(FBL5N!O:O,FBL5N!D:D,Y1120_CREDIT!B6,FBL5N!S:S,{""<>0"",""<>3"",""<>9"",""<>O"",""<>D""})"