title: Add a cell formula in Excel via vba
body: <p>I’m not an Excel or VBA expert but I want to insert this current excel formula into cell’s using VBA.</p>
  
  <p>Current Excel formula:</p>
  
  <pre><code>=IF(OR(ISNUM(D570)=FALSE;ISNUM(D573)=FALSE);"";IF(C573="Total";D573-D570;""))
  </code></pre>
  
  <p>VBA formula :</p>
  
  <pre><code> ActiveSheet.Range("a" &amp; ActiveSheet.Rows.Count).End(xlUp).Offset(2, 12).Value = "=IF(OR(ISNUM(R[-3]C[-9])=FALSE;ISNUM(R[0]C[-9])=FALSE);'';IF(R[0]C[-10]='Total';R[0]C[-9]-R[-3]C[-9];''))"
  </code></pre>
  
  <p>It doesn’t work… Someone can help me please?</p>