Excel VBA cell.Formula for each row in a column (as If I dragged down the formula)
<p>How could I make the G2 value in this code to simulate it being dragged down in excel, as of right now the formula only test for G2 in each row it is inserted into where I rather the code test according to each row, i.e. G2,G3,G4,G5.. (only column G)</p>

<pre><code>    LASTROW2 = Range("J" &amp; Rows.Count).End(xlUp).Row
    Set rng2 = Range("J2:J" &amp; LASTROW2)
For Each cell In rng2
       cell.FormulaR1C1 = "=VLOOKUP(RC[-3],$G:$I,2,FALSE)/VLOOKUP(RC[-8],$A:$C,2,FALSE)"
 Next cell
</code></pre>

<p>Right now I receive an <code>application defined error</code> with the cell.FormulaR1C1 and I have never debugged one of these error codes before</p>