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,"")"
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,"")"
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,"")"
>
Range("E2").Formula = "=IF(G2,I2,"""")"
do the same for your other formula.
double quotes within quotes
--
Regards,
Tom Ogilvy
"brent" <[email protected]> wrote in message
news:[email protected]...
> 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,"")"
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks