Bug 147129 - in Calc function VERGLEICH isn't working like expected (version 7.3.0.3 x64)
Summary: in Calc function VERGLEICH isn't working like expected (version 7.3.0.3 x64)
Status: CLOSED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.3.0.2 rc
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-02 13:56 UTC by jwschuetz1954
Modified: 2022-02-02 15:21 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
small file for reproducing the bug (8.34 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-02-02 13:58 UTC, jwschuetz1954
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jwschuetz1954 2022-02-02 13:56:59 UTC
Description:
Function VERGLEICH( value; searchmatrix; type ) isn't working like expected (but working in Excel).


For example in my sheet I have a row 2 with content

        A B C D E ...
row 2:      1 2 3


My function VERGLEICH(0;$2:$2;-1) returns the value 5. That is what I expect.
But if I delete the above value 2, then I get #NV. I expect also the value 5.

I try to attach the corresponding test sheet.


Steps to Reproduce:
1. open attached test sheet
2. displayed in A1 is the value 5 - like expected
3. delete in row 2 the value 2
4. now in A1 a #NV is displayed
5. I expect (an see in Excel) value 5 again

Actual Results:
The software displays the wrong value #NV.

Expected Results:
The software should display value 5.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
This is not a new issue. I saw it also in the previous stable version.
Comment 1 jwschuetz1954 2022-02-02 13:58:50 UTC
Created attachment 177991 [details]
small file for reproducing the bug
Comment 2 Eike Rathke 2022-02-02 15:21:34 UTC
The 4th argument -1 requires that the lookup array MUST be sorted descending, but it is not. If data is not sorted as expected, the result is arbitrary.
See https://help.libreoffice.org/7.3/de/text/scalc/01/04060109.html?DbPAR=CALC#bm_id3158407

Not a bug.