LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 573
Default inserting formula

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.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting Formula vcprabhu Excel Discussion (Misc queries) 1 April 6th 09 06:55 AM
HELP with inserting formula Dragos Excel Programming 2 September 20th 05 03:38 PM
inserting a formula dstiefe Excel Discussion (Misc queries) 6 August 10th 05 09:33 PM
Formula changes while inserting a row !!!! Sanjeev Unnikrishnan Excel Worksheet Functions 3 April 16th 05 02:45 PM
Inserting Formula Tom Ogilvy Excel Programming 4 July 14th 04 10:58 PM


All times are GMT +1. The time now is 06:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"