inserting formula
& ""d"" &
should be
& """d""" &
--
Tim Williams
Palo Alto, CA
"davegb" wrote in message oups.com...
I'm trying to insert the following formula into my spreadsheet using
the following code
'insert formula =IF(G2<"",DATEDIF(G2,H2,"d")+1,"")
.cells(lnextrow,"I").formula="=IF(G" & lprevsumrow &
"<" & """" _
& ",DATEDIF(G" & lprevsumrow & ",H" & lprevsumrow &
"," & ""d"" & _
")+1, "& """" & ")"
The row will not always be 2, but will be a long variable called
lPrevSumRow.
I'm getting an "end of statement" compile error, highlighting the d in
double quotes. I'm missing something in the syntax. But what the *&^%
is it?
Thanks again.
|