View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dana DeLouis[_3_] Dana DeLouis[_3_] is offline
external usenet poster
 
Posts: 690
Default Entering Formula with "" within it

Just an alternative...

ActiveCell.Formula = "=IF(ISBLANK(Range1),Range2, Range1)"

--
Dana DeLouis
Win XP & Office 2003


"Ron McCormick" wrote in message
...
I am trying to write the appropriate code to enter a formula along the
following lines into a particular cell in a worksheet.

=IF(Range1= "",Range2, Range1)

I've been advised that I should use coded version of the quotes
incorporating Chr (34) - something like:

strQuote = Chr(34)
ActiveCell.Formula = "=IF(Range1= "& Chr(34) &" ,Range2,Range1)"

but I can't seem to get the syntax quite right.

Any help would be appreciated.
--
TIA
Ron