title: How to put a formula into a cell by Excel VBA?
body: <p>I'm trying to put this  <code>=IF(D49&gt;0,D49-D50-D51+D52+D53,)</code> into a cell <code>D54</code> by using macro. </p>
  
  <p>My code is as follow</p>
  
  <pre><code>Range("D54").FormulaR1C1 = "=IF(D52&gt;0,D49-D50-D51+D52+D53,)"
  </code></pre>
  
  <p>But when I run the macro. </p>
  
  <p>Cell <code>D54</code> gets this <code>=IF('D52'&gt;0,'D49'-'D50'-'D51'+'D52'+'D53',)</code> instead.</p>
  
  <p>Excel adds quotation marks to each dells in the formula, render the formula useless. How can I get macro to into formula as formula? </p>