Bug 126898 - Using INDIRECT with DataBase Range to define the Array in an HLOOKUP formula fails.
Summary: Using INDIRECT with DataBase Range to define the Array in an HLOOKUP formula ...
Status: CLOSED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.4.7.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 126899 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-08-13 22:06 UTC by bugzilla
Modified: 2019-08-14 12:24 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
shows vlookup functioning with indirect, and hlookup not working. (12.30 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-08-13 22:07 UTC, bugzilla
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bugzilla 2019-08-13 22:06:04 UTC
Description:
I have a VLOOKUP formula, [ =VLOOKUP(G2,INDIRECT(F2),2,0) ], where F2 varies, but is a named range. This formula works.

When I try the same with HLOOKUP, [ =HLOOKUP(G17,INDIRECT(F17),2,0) ] the INDIRECT fails. If I put the name of the Range directly into the formula, it works, however if I try to do it where the name of the Range is in F17, it fails.

Actual Results:
I get an Err:502

Expected Results:
Should be the same as vlookup


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 bugzilla 2019-08-13 22:07:30 UTC
Created attachment 153363 [details]
shows vlookup functioning with indirect, and hlookup not working.
Comment 2 m_a_riosv 2019-08-13 23:23:31 UTC
Sorry, but there are not named ranges on the sample.
Comment 3 m_a_riosv 2019-08-13 23:25:00 UTC
*** Bug 126899 has been marked as a duplicate of this bug. ***
Comment 4 Oliver Brinzing 2019-08-14 09:08:53 UTC
(In reply to m.a.riosv from comment #2)
> Sorry, but there are not named ranges on the sample.

attached example contains 4 "Database Ranges" (Menu Data/Define Range...)
Comment 5 m_a_riosv 2019-08-14 09:24:04 UTC
Sorry, confirmed.
Comment 6 Oliver Brinzing 2019-08-14 11:50:56 UTC
with: 

Version: 4.4.7.2
Build-ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Gebietsschema: de_DE

F3/F18 is #REF!

and with 

Version: 5.4.7.2 (x64)
Build-ID: c838ef25c16710f8838b1faec480ebba495259d0
CPU-Threads: 4; BS: Windows 6.19; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc: single

F3  is a
F18 is Err:502

btw: it works with a named range: m = $Sheet1.$A$12:$G$13