title: excel vba - insert a formula using variables
body: <p>Hi I want to insert formula into a cell by determining variables for each value.</p>
  
  <p>Eg. </p>
  
  <pre><code>=G5/D5
  </code></pre>
  
  <p>So in cell </p>
  
  <pre><code>Sheets("Sheet1").cells(LastRow + 2, 2).value = "=columnletter1 + (lastrow + 2)/columnletter2 + (lastrow + 2)
  </code></pre>
  
  <p>I find the columnletter is G by determining if the column name is X and the row is LastRow + 2.
  How do I write so that I get "=G5/D5" returned into the cell?</p>