title: Excel VBA, using variables with VLOOKUp
body: <p>I am trying to add a <code>VLOOKUP</code> to a column to enter data from one sheet to another. The size of the table array on the look up sheet will vary so I want add a variable to formula. </p>
  
  <p>Here's what I have so far:</p>
  
  <pre><code>Sheets("Page1_5").Select
  
  Dim CountryRow As Long
  Cells(5, 1).Select
  Selection.End(xlDown).Select
  CountryRow = ActiveCell.Row
  Sheets("Results").Select
  Range("B2").Select
   ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-1],Page1_5!$A$5:$F$" &amp; CountryRow &amp; ",6,FALSE)"
  </code></pre>
  
  <p>Any assistance would be gratefully received</p>