Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run Time Error 1004 - Application-defined or object-defined error
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,"")" |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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,"")" |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run Time Error 1004 - Application-defined or object-defined error
Range("E2").Formula = "=IF(G2,I2,"""")"
do the same for your other formula. double quotes within quotes -- Regards, Tom Ogilvy "brent" wrote in message ... 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,"")" |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Run-time Error 1004: Application-defined or Object-defined Error | Excel Programming | |||
run-time error '1004': Application-defined or object-deifined error | Excel Programming | |||
Macro Run-time Error 1004 Application Defined or Object Defined Error | Excel Programming | |||
"Run Time Error 1004 Application Defined or Object Defined Error." | Excel Programming |