Bug 59306 - Calling a table by range-name in VLOOKUP returns #NA
Summary: Calling a table by range-name in VLOOKUP returns #NA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
Depends on:
Reported: 2013-01-13 04:40 UTC by trj
Modified: 2016-03-06 13:46 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

test spreadsheet that reliably demonstrates error/bug. (16.78 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-01-13 04:40 UTC, trj

Note You need to log in before you can comment on or make changes to this bug.
Description trj 2013-01-13 04:40:29 UTC
Created attachment 72945 [details]
test spreadsheet that reliably demonstrates error/bug.

The attached mini-spreadsheet shows this and several other problems. Here, the range B15:C38 has been named "TABLE", as can be confirmed by F5. But the call, in A7, of: VLOOKUP(A3,table,2) returns #N/A, instead of the expected 105. The same call, with the explicit range B15:C38 in the place of "table", works correctly.

OO calc, 3.3.0, behaves the same.

LO; Build ID: 3215f89-f603614-ab984f2-7348103-1225a5b.
Comment 1 retired 2013-06-01 08:31:43 UTC
Same on OS X 10.8.3 with LO 4.1b1 so setting OS to ALL and bug to NEW.

Are all formulas being used ok?
Comment 2 QA Administrators 2015-03-16 23:18:10 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

    Test to see if the bug is still present on a currently supported version of LibreOffice (4.4.1 or later)

    If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior
  If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System

Please DO NOT

    Update the version field
    Reply via email (please reply directly on the bug tracker)
    Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3)


2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to "inherited from OOo";
4b. If the bug was not present in 3.3 - add "regression" to keyword

Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa

Thank you for your help!

-- The LibreOffice QA Team This NEW Message was generated on: 2015-03-16
Comment 3 Jean-Baptiste Faure 2015-03-28 22:04:11 UTC
It is not said in the help that VLOOKUP() function should accept range name.

So, is it a bug/defect or an enhancement?

Best regards. JBF
Comment 4 Eike Rathke 2016-03-06 13:46:33 UTC
The name "table" is defined to use relative references. Originally defined on Sheet1_2.M35 it references B15:C38. Using the name in another cell shifts relative references accordingly, in this case it even wraps them around the sheet border. Define the name to use absolute references instead, i.e. $B$15:$C$38

There's a bug in displaying a wrapped reference and it displays with #REF parts, invoke Manage Names (Ctrl+F3) on cell M35 to get the correct value and edit it.