Run Time Error 1004 - Application-defined or object-defined error
Quotes inside quotes. Try this in the immediate pane:
? "=IF(G2,I2,"")"
you should get
=IF(G2,I2,")
which is an invalid formula and therefore the error. Solution is to use ""
wherever you want ", so """" for "":
Range("E2").Formula="=IF(G2,I2,"""")"
and similarly for your other formula
--
- K Dales
"brent" wrote:
Can someone tell me why this formula gives me a run time eror?
Range("E2").Formula = "=IF( AND( NOT(G2),
NOT(ISBLANK(B2)),NOT(ISBLANK(I2))),TODAY()-I2,"" )"
or why this also gives the same error?
Range("E2").Formula = "=IF(G2,I2,"")"
|