Bug 135718 - LOOKUP function stopped working
Summary: LOOKUP function stopped working
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Calc-Function
  Show dependency treegraph
Reported: 2020-08-13 14:38 UTC by lkp1957
Modified: 2021-07-01 04:05 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

spreadsheet showing the issue (27.04 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-12-01 12:27 UTC, matevz.langus@borea.si

Note You need to log in before you can comment on or make changes to this bug.
Description lkp1957 2020-08-13 14:38:13 UTC
Had a list of LOOKUP functions referencing a table to report values as they updated. Worked great for months until yesterday when it suddenly started reporting wrong values mostly the same one. Checked the formulas and all good.

Steps to Reproduce:
1.Set up a two column table of text in one and values in the other
2.Set up second list of text with LOOKUP functions to report the corresponding values
3. Update the values in the first table

Actual Results:
Mostly a single number randomly returned with a few others. All incorrect

Expected Results:
The correct values every update

Reproducible: Always

User Profile Reset: No

Additional Info:
[Information automatically included from LibreOffice]
Locale: en-GB
Module: SpreadsheetDocument
[Information guessed from browser]
OS: Windows (All)
OS is 64bit: no
Comment 1 Roman Kuznetsov 2020-08-13 18:21:57 UTC
please attach your file here and write info from Help->About dialog
Comment 2 Eike Rathke 2020-08-17 09:42:23 UTC
Hint: sounds like the values where the lookup happens are not strictly sorted ascending. Values MUST be sorted, otherwise results are arbitrary. See also https://help.libreoffice.org/latest/en-GB/text/scalc/01/04060109.html?DbPAR=CALC#bm_id3159273
Comment 3 matevz.langus@borea.si 2020-12-01 12:27:48 UTC
Created attachment 167711 [details]
spreadsheet showing the issue


I reproduced the same error most probably. Attached file demonstrating the issue.

I can confirm the reason for the problem was unsorted lookup vector.
But if I exported to xslx and opened in Apple Numbers then it worked fine without any changes.

So perhaps it is a bit strange that vector must be sorted after all.
Being a developer it makes sense to me, but yesterday I was a secretary and in that mode of operation I did not even think sorting would be required.

Comment 4 matevz.langus@borea.si 2020-12-01 12:38:13 UTC
I was using:
Comment 5 QA Administrators 2021-05-31 04:12:48 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2021-07-01 04:05:45 UTC
Dear lkp1957,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team