title: Set range for entire sheet for vlookup
body: <p>I am trying to do vLookup. For Vlookup syntax, it would be: VLOOKUP( value, table, index_number, [approximate_match] ) For the table I want to select the whole sheet, however I dun know where does the row ends for the data. How do I set the range for entire sheet till the unknown rows. So as to the codes below: 
  <strong>Sheet4.range("D1:Y14945")</strong> It would be Y unknown as I don't know where the row ends. Thanks for your help in advance :) </p>
  
  <pre><code>Dim look As Variant
  Dim x As Integer
  x = 2
  Sheet1.range("N2").Select
  Do Until IsEmpty(ActiveCell)
  look = Sheet1.Cells(x, 14).Value
  ActiveCell.Offset(1, 0).Select
  result = Application.WorksheetFunction.VLookup(look, 
  Sheet4.range("D1:Y14945"), 21, False)
  Sheet1.Cells(x, 15).Value = result
  x = x + 1
  Loop
  </code></pre>