Bug 116216 - LOOKUP on array doesn't handle sorted error values correctly
Summary: LOOKUP on array doesn't handle sorted error values correctly
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:6.1.0
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-05 20:51 UTC by Eike Rathke
Modified: 2021-03-29 15:56 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eike Rathke 2018-03-05 20:51:27 UTC
=LOOKUP(2;1/(C2:E2<>"");C3:E3) should return the value of D3 if C2:D2 have content each, but returns #DIV/0! error instead. It only works (returning a match for the last subsequently filled cell in the range) if all cells C2:E3 have content.
Comment 1 Commit Notification 2018-03-05 21:25:34 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a2a15163a6a381957f2cb2ed6fe659577ebde558

Resolves: tdf#116216 array sort order of error values in LOOKUP and MATCH

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 2 Commit Notification 2018-03-05 21:55:32 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ba490001c2d82c1172854ca16d7099b19e29cb60

Unit test for tdf#116216

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Eike Rathke 2018-03-05 22:03:53 UTC
(In reply to Eike Rathke from comment #0)
> It only works if all cells C2:E3 have content.
That should had been "all cells C2:E2" of course. (Only the range creating the array from to perform the lookup in).
Comment 4 Commit Notification 2021-03-26 16:31:33 UTC Comment hidden (obsolete)
Comment 5 Xisco Faulí 2021-03-29 15:56:45 UTC
The unittest added in comment 4 is for bug 141146, not for this issue