title: Enter Cell Formula using VBA
body: <p>I have this simple formula in Cell A1</p>
  
  <pre><code>=10*Round(B1/10,0)
  </code></pre>
  
  <p>I know how to enter this in VBA, i simply write:</p>
  
  <pre><code>Range("A1").Formula = "=10*Round(B1/10,0)"
  </code></pre>
  
  <p>Now, what if I don't know the cell whose number I want to round? In other words, i have an integer variable in my code, N, that can take on multiple values, and I want to round the number in row number N of column B. </p>
  
  <p>How do I write this?
  I tried:</p>
  
  <pre><code>Range("A1").Formula = "=10*Round(B" &amp; N &amp; "  &amp; "/10",0)"
  </code></pre>
  
  <p>But this doesn't work. Tried multiple layouts for the quotes but without success.</p>
  
  <p>Can anyone let me know:</p>
  
  <ol>
  <li>How to enter that simple formula? and more importantly</li>
  <li>Provide some link/reference that would help me with entering other
  formulas in the future?</li>
  </ol>
  
  <p>Thanks</p>