View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Karen53 Karen53 is offline
external usenet poster
 
Posts: 333
Default Mammoth Insert Formula

Thanks for the suggestion. I tried it but I'm still getting the same
message. Any other thoughts?

"cubbybear3" wrote:

On Sep 18, 4:08 pm, Karen53 wrote:
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($P 42),$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.


It looks to me like your last line "C11)* R" & iCtr & "C9/365*
_(R6C2)))))" needs another double quote before and after the
underline (continuation).