Bug 167079 - [LOCALHELP] Help for LOOKUP function needs improvement
Summary: [LOCALHELP] Help for LOOKUP function needs improvement
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
7.6.4.1 release
Hardware: All All
: medium normal
Assignee: Olivier Hallot
URL:
Whiteboard: target:26.2.0
Keywords:
Depends on:
Blocks: HelpGaps-NewFeatures Help-Changes-Features
  Show dependency treegraph
 
Reported: 2025-06-18 13:33 UTC by Regina Henschel
Modified: 2025-06-18 20:22 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2025-06-18 13:33:30 UTC
The information in the help does not correspond to the information on the Wiki and is not sufficient. Look at section "If Search vector is a multi-dimentional..." on the Wiki.

In addition, a link to the Wiki is missing in the help. The other functions on that page lack a link to the Wiki as well.

The Help page for master is https://help.libreoffice.org/master/en-US/text/scalc/01/04060109.html?DbPAR=CALC#bm_id3159273
The Wiki page is https://wiki.documentfoundation.org/Documentation/Calc_Functions/LOOKUP/en

Problems:
(A)
current in Help:
SearchVector is the single-row or single-column area to be searched.

That is not correct. Especially for the variant with omitted ResultVector the SearchVector needs to be a two-dimensional array. But a two-dimensional array is allowed too if ResultVector is given.

If ResultVector is omitted, the first column (or row, see B) of the array acts as SearchVector and the last column acts as ResultVector. If ResultVector is given, then that one is used.

(B)
The help misses the fact, that depending of the column-row count ratio of SearchVector a column or a row of the array is used for searching, in the case ResultVector is omitted.

(C)
SearchVector needs do be sorted. But neither Wiki nor Help mention how mixed content is expected to be sorted. According to specification numbers precede text.
https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part4-formula/OpenDocument-v1.3-os-part4-formula.html#__RefHeading__1018428_715980110

To get a glue about LOOKUP function, you might look at
https://support.microsoft.com/en-us/office/lookup-function-446d94af-663b-451d-8251-369d5e3864cb
or
https://support.google.com/docs/answer/3256570?hl=en&ref_topic=3105472&sjid=5840723368810875403-EU
Comment 1 Commit Notification 2025-06-18 20:22:28 UTC
Olivier Hallot committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/32c9fa01cbd9543a402333d3c0cd57e40d6a39e3

tdf#167079 Improve and fix LOOKUP Help page