title: Autofill Destination VBA
body: <p>I have 2 worksheets, Data &amp; Convert.</p>
  
  <p><a href="https://i.stack.imgur.com/Brm7q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Brm7q.png" alt="enter image description here"></a></p>
  
  <p>Trying to do an autofill in "Convert" based on "Data" last row (can be longer than 100 rows) by using this macro:-</p>
  
  <pre><code>Public Sub Call_Generate_Data()
  
  
      Sheets("Convert").Select
      ActiveCell.FormulaR1C1 = "=VLOOKUP(Data!RC[4],Links!R1C1:R14C2,2,FALSE)"
      Range("B2").Select
      ActiveCell.FormulaR1C1 = "=IF(Data!RC[12]="""",""1/1/2014"",Data!RC[12])"
      Range("B3").Select
      Selection.AutoFill Destination:=Range("A2:B" &amp; Sheets("Data").Range("D" &amp; Rows.Count).End(xlUp).Row)
      Sheets("Data").Select
      Range("B3").Select
  
  End Sub
  </code></pre>
  
  <p>However, I failed:-</p>
  
  <p><a href="https://i.stack.imgur.com/GpNSC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GpNSC.png" alt="enter image description here"></a></p>
  
  <p>Error msg:-</p>
  
  <p><a href="https://i.stack.imgur.com/dgEZ8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dgEZ8.png" alt="enter image description here"></a></p>
  
  <p>Debugged:-</p>
  
  <p><a href="https://i.stack.imgur.com/sUqfa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sUqfa.png" alt="enter image description here"></a></p>
  
  <p>Can someone help me out?</p>