View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Writing a formula into a cell

Schwartz.

Try this

Range("A1").FormulaR1C1="=IF(RC[1],"""",""Ok"")"

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Dr. Schwartz" wrote in message
...
How should the code look like if I want my macro to enter a formula into a

cell.

Example:
Cell A1 is empty
I run my macro
Cell A1 contains the formula: =IF(B1="";"Ok";"")

Any help is appriciated, thank you.
Schwartz