View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
davegb davegb is offline
external usenet poster
 
Posts: 573
Default inserting formula


NickH wrote:
Okay, yes you are right the correct way of looking at it would be as
follows...

This string:
"=IF(G"

is concatenated to this variable:
lprevsumrow

which is concatenated to this string:
"<"""",DATEDIF(G"

which is concatenated to this variable:
lprevsumrow

concatenated to this string:
",H"

concatenated to this variable:
lprevsumrow

concatenated to this string:
",""d"")+1,"""")"


To explain the double quotes: When the code encounters a quotation mark
(") it reads it as the start of a string. the next quotation mark
encountered will signal the end of a string unless it is followed
immediately by a second quotation which means 'hey I'm part of the
string so don't stop yet!'

My apologies for not thinking it through properly before.

Kind regards,
NickH


That makes more sense. I understand the double quotes. Some of the
others were a little harder to discern. It's starting to make sense
now, which is what I was hoping to get out of this, so I can do it
better next time.

Thanks for taking your time, Nick.