https://bugs.documentfoundation.org/show_bug.cgi?id=160725

            Bug ID: 160725
           Summary: XLOOKUP has different result for approximate search
                    than Excel
           Product: LibreOffice
           Version: 24.8.0.0 alpha0+ Master
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: rb.hensc...@t-online.de
                CC: balazs.varga...@gmail.com

Created attachment 193748
  --> https://bugs.documentfoundation.org/attachment.cgi?id=193748&action=edit
Testfile for XLOOKUP approximate search.

Open attached ods document and look at sheet "next_smaller". It has data in
column A and B.
It examines the formula
    =XLOOKUP("Luchs";A2:A8;B2:B8;;-1;-2)
The formula is in cell D2.
LibreOffice calculates the result "Udo".

Save the file in xlsx format and open the saved file in Excel 365. Excel
calculates "Susanne".

A similar difference can be seen with function MATCH, see sheet "exact_match".
That might be related.

I have not tested approximate search with ascending ordered data. But a similar
error is likely. To see the problem open the unit test document
sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods. Save it to xlsx and
open that file in Excel. Go to Sheet2 and notice in column C the "FALSE" in row
114 and row 121. Those belong to formula
   =XLOOKUP($O$1;P$1:P$11;T$1:T$11;;-1;2)
and
   =XLOOKUP($O$1;R$1:R$11;T$1:T$11;;-1;-2)
respectively.

[BTW: That test file is a great work!]

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to