title: Using LastRow in a Range
body: <p>I have asked to find the last row in a Range with the following:</p>
  
  <pre><code>Dim LastRow As Integer
  LastRow = ActiveSheet.UsedRange.Rows.Count
  </code></pre>
  
  <p>Now, I'd like to select a range with a known column and an unknown last row. I'd like to fill in the entire column without overshooting the rows by insert an exact number. Here is what I have - </p>
  
  <pre><code>Range("AA2").Select
  ActiveCell.FormulaLocal = "=Vlookup(A2,[CP_QR_5_prep.xlsm]Sheet1!A2:LastRow,18,false)"
  Selection.AutoFill Destination:=Range("AA2:AA &amp; LastRow)
  </code></pre>
  
  <p>How can I correct my syntax and understand how to use lastrow/lastcolumn?</p>