title: How to auto fill the column of the active cell till the last row
body: <p>Trying to execute below code:</p>
  
  <pre><code>ActiveCell.Offset(1, 0).Select 'Noting but F2
  
  
  
  
  
    ActiveCell.FormulaR1C1 = "=LEFT(RC[-1],4)"
  
  
  
  
  
  ' find last row with data in column "A"
  
  lastRow = Cells(Rows.Count, "A").End(xlUp).Row
  
  
  
  ' copying the formula from "F2" all the way to the last cell
  
  ActiveCell.AutoFill Destination:=Range(ActiveCell.EntireColumn &amp; lastRow), Type:=xlFillDefault
  </code></pre>
  
  <p>It gives an error saying type mismatch.</p>
  
  <p>But when I try:</p>
  
  <pre><code>ActiveCell.AutoFill Destination:=Range("F2:F" &amp; lastRow), Type:=xlFillDefault
  </code></pre>
  
  <p>It works properly, but I don't want F2:F there, as I don't know which column will be in future.</p>