K
Karen53
Hi,
I've been going round and round with this. I don't see what is wrong. The
formula works perfectly in the spreadsheet but it won't let me insert it
programmatically.
original formula
=IF(ISBLANK($J36),"",IF($J36="No",0,IF(ISNUMBER($P42),$P42,IF(ISBLANK($B$6),
_($K42*$G42),($K42*$G42)/365*($B$6)))))
Insert formula
ActiveCell.FormulaR1C1 = "=IF(ISBLANK(R" & iCtr & "C10),"",""IF(R" & iCtr &
"C10) _=""No"",0,IF(ISNUMBER(R" & iCtr & "C16),R" & iCtr &
"C16,IF(ISBLANK(R6C2),(R" _ & iCtr & "C11* R" & iCtr & "C9),(R" & iCtr &
"C11)* R" & iCtr & "C9/365* _(R6C2)))))"
I get an Application defined or Object defined error.
Thanks.
I've been going round and round with this. I don't see what is wrong. The
formula works perfectly in the spreadsheet but it won't let me insert it
programmatically.
original formula
=IF(ISBLANK($J36),"",IF($J36="No",0,IF(ISNUMBER($P42),$P42,IF(ISBLANK($B$6),
_($K42*$G42),($K42*$G42)/365*($B$6)))))
Insert formula
ActiveCell.FormulaR1C1 = "=IF(ISBLANK(R" & iCtr & "C10),"",""IF(R" & iCtr &
"C10) _=""No"",0,IF(ISNUMBER(R" & iCtr & "C16),R" & iCtr &
"C16,IF(ISBLANK(R6C2),(R" _ & iCtr & "C11* R" & iCtr & "C9),(R" & iCtr &
"C11)* R" & iCtr & "C9/365* _(R6C2)))))"
I get an Application defined or Object defined error.
Thanks.