title: VLOOKUP in last column of Table_array
body: <p>I understand that VLOOKUP searches the first column of a table in order to find a value, then it grabs the value from the same row and a different user-specified column. The following code returns data from the 2nd column, column B.</p>
  
  <pre><code>VLOOKUP(5,$A$2:B100,2)
  </code></pre>
  
  <p>Is there a way to set the return column to the last column of the input table? Something like the following, which would return data from columns B, P, and AC, respectively.</p>
  
  <pre><code>VLOOKUP(5,$A$2:B100,end)
  VLOOKUP(5,$A$2:P100,end)
  VLOOKUP(5,$A$2:AC100,end)
  </code></pre>
  
  <p>Alternatively, is there a way to grab the current column number and use that as an index?</p>
  
  <pre><code>VLOOKUP(5,$A$2:B100,current_column_number)
  </code></pre>
  
  <p>I'd like to write one VLOOKUP formula and then be able to drag it right across the spreadsheet, so that B100 becomes C100, D100, E100, etc. and the column lookup changes accordingly.</p>
  
  <h2>Update</h2>
  
  <p>I can do the alternate approach using the COLUMN function, but it requires programming a fixed offset and doesn't seem as robust. I'd still like to know if there is an "end" option.</p>