[Libreoffice-bugs] [Bug 132131] Error with new function recherchev (in french)
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Thu Apr 16 11:45:31 UTC 2020
https://bugs.documentfoundation.org/show_bug.cgi?id=132131
--- Comment #12 from Julien Nabet <serval2412 at yahoo.fr> ---
Taking a look at
https://opengrok.libreoffice.org/xref/core/sc/source/core/tool/interpr1.cxx?r=61d8db6b#7204
7204 void ScInterpreter::CalculateLookup(bool bHLookup)
7205 {
...
7210 // Optional 4th argument to declare whether or not the range is
sorted.
7211 bool bSorted = true;
7212 if (nParamCount == 4)
7213 bSorted = GetBool();
7214
...
7299 if ( bSorted )
7300 rEntry.eOp = SC_LESS_EQUAL;
So when there's no final ";", it's considered as true.
so
VLOOKUP($A$2;$C$2:$E$5;2)
is equivalent to
VLOOKUP($A$2;$C$2:$E$5;2;1)
VLOOKUP($A$2;$C$2:$E$5;)
is equivalent to
VLOOKUP($A$2;$C$2:$E$5;2;false)
About difference with numbers, I think it's the same behaviour,
if you put this in C10:D11
2 test2
1 test1
then =VLOOKUP(1;C10:D11;2)
you got "N/A"
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200416/e01f3116/attachment.htm>
More information about the Libreoffice-bugs
mailing list