title: Excel vba autofill coding
body: <p>I am currently using vba to perform the following tasks. So I copied data from sheet1 and pasted it in sheet2. There was already data in sheet2, so I pasted below the existing data. Now I need to perform a vlookup to get data from sheet3 to sheet2 for certain columns, so the vlookup would send the data below the existing data on sheet2. I have the following codes below</p>
  <pre><code>Range(“F1”).End(xldown).Offset(1).Select
  ActiveCell.FormulaR1C1 = “=Vlookup(RC[7],Monitor_Report[#All],4,FALSE)”
  </code></pre>
  <p>ActiveCell.AutoFill Destination:=Range(ActiveCell.Address &amp; “:” &amp; ActiveCell.End(xlDown).Offset(-1,0).Address)</p>
  <p>So currently even tho, the next row has no data, it still auto fills and results in #N/A after the cell where the vlookup occurs first. i do not want the autofill to happen if the next row has no data. Can anyone assist me to modify this code?</p>