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

Eike Rathke <er...@redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|x86-64 (AMD64)              |All
            Version|4.2.5.2 release             |Inherited From OOo
                 OS|Windows (All)               |All

--- Comment #2 from Eike Rathke <er...@redhat.com> ---
The LOOKUP function is *defined* to work on ascending sorted data. That is how
all major spreadsheet applications implement it. As an implementation may and
probably will use some sort of binary search on such a range of data to speed
up the lookup, the result *will* be arbitrary if the data is not sorted,
depending on algorithm and actual data. That is the nature of applying binary
search algorithms to non-sorted data. To determine an error in sorting the
function would have to iterate all values in the range and compare with the
neighbour data, which would significantly slow down things. Which still
wouldn't help if the spreadsheet is loaded in another implementation where
another arbitrary value would be returned.

The only viable solution to this is a new ISSORTED(range) function that the
user can call as in =IF(ISSORTED(range1);HLOOKUP(x;range1;range2);NA())

I'm tempted to close this as WONTFIX though.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to