title: Autofill according to other column value
body: <p>I have some problems with VBA Autofilling.
  Please find my code below.</p>
  
  <pre><code>Worksheets("DataSource").Range("E" &amp; ActiveSheet.UsedRange.Rows.Count).End(xlUp).Select
  ActiveCell.Offset(1, 0).Value = Worksheets("DataSource").Range("E" &amp; ActiveSheet.UsedRange.Rows.Count).End(xlUp).Value + 1
  ActiveCell.Offset(1, 0).Select
  ActiveCell.AutoFill Destination:=Worksheets("DataSource").Range(ActiveCell.Address &amp; ":E" &amp; Cells(Rows.Count, "A:A").End(xlUp).Row)
  </code></pre>
  
  <p>Basically, I want to make this VBA as:</p>
  
  <p>1) +1 from last value in Column E {ex) if E45 was "46", I want to make add E46 as "47"}</p>
  
  <p>2) Select E46(47)</p>
  
  <p>3) Autofill E46(47) until the row that some value exist in A.</p>
  
  <p>To explain a bit more, if A has value until A89, then I want to autofill until row 89, so in this case E89.</p>
  
  <p>Problem now:</p>
  
  <p>Sometimes Autofilling does not work until the last row. Especially, when I run this code again it only works until the middle row.</p>