Trying to Auto Fill to last row of data
<p>I am trying to fill a column with <code>VLOOKUP</code>. I want to fill the range from the current cell down to the last row with data. I have looked at the questions here and I have looked at other examples and it should work but all it is doing is stopping at the first blank cell. I am trying to take the vlookup in <code>D3</code> and autofill it down to the last row with data. Here is my code so far. </p>

<pre><code>Dim lastRow As Long
lastRow = Range("D" &amp; Rows.Count).End(xlUp).Row
Range("D3").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[2],Messages.csv!C1:C18,15,FALSE)"
Range("D3").Select
Selection.AutoFill Destination:=Range("D3:D" &amp; lastRow) 
</code></pre>

<p>What is wrong with my setup?</p>