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

--- Comment #15 from ady <[email protected]> ---
(In reply to Winfried Donkers from comment #14)
> In the sample files that have been attached, none of the ranges looks sorted

Indeed, that was specifically mentioned.


> to me. Then all results for MATCH with 3rd argument 1, -1 or empty have no
> real meaning.

That is not completely accurate. It is true that the lookup array is expected
to be sorted, and when it isn't, the results are not "predictable". That means
that the result cannot be expressed beforehand in some generic simple words,
but rather that it depends on a case-by-case basis. But, that does not mean
that the results will be different according to whatever goes in the list after
the first matched value. IOW, the result shall still be repeatable. That is why
I added an attachment, to demonstrate exactly this non-repeatable behavior. Let
me emphasize the point...

If I am using "1" (ascending) search, and the lookup array starts with
{0;1;whatever}, then when the lookup value is "1" (without quotation marks),
the result shall be "2" (without quotation marks), always. The result cannot
vary depending on the _next_ values. MATCH() should find the first value that
accomplishes the conditions. Attachment 185129 demonstrates that this is not
currently the case (the result varies, depending on values that are _after_ the
first position that accomplishes the conditions), and if you check with LO
7.3.x (and older), you should obtain "2" as result.

So, yes, there is no generic way to know the result beforehand as a generic
rule, but the results shall still follow the conditions/rules; they are not
random, or vary according to the number of empty cells _after_ the first "OK"
value.

Please review attachment 185129 again, in order to spot these nonsensical
varying results.

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

Reply via email to