title: POI 3.12 VLOOKUP error: Specified named range 'other sheet name' does not exist in the current workbook
body: <p>Can apache POI 3.12 do a VLOOKUP to a different sheet? Say I have a formula as follows (this formula works in Excel):</p>
  
  <pre><code>VLOOKUP(N6,Baskets,14,0)
  </code></pre>
  
  <p>I'm trying to use it to get a value from the Baskets sheet a use it on another sheet.  </p>
  
  <p>It is giving this error:</p>
  
  <pre><code>org.apache.poi.ss.formula.FormulaParseException: Specified named range 'Baskets' does not exist in the current workbook.
  </code></pre>
  
  <p>In searching the web on this I haven't really found an answer. <a href="https://poi.apache.org/apidocs/org/apache/poi/ss/formula/functions/Vlookup.html" rel="nofollow">The POI API    for VLOOKUP</a> kind of suggests to me that it can only be used for use in ranges specified on the current sheet. However, I'm probably just adding meaning to the argument name of table_array. That is all that I've found for documentation on it.</p>
  
  <p><strong>After the answer was found here is the source of my confusion</strong>
  According to the <a href="https://help.libreoffice.org/Calc/Spreadsheet_Functions#VLOOKUP" rel="nofollow">Libre Office documentation</a> the array argument has to have more than one column. The first column must contain the search criterion and the other columns must contain the column used as the index argument. Finally, the index argument is relative to the array argument not the workbook's column indexes. </p>