https://bugs.documentfoundation.org/show_bug.cgi?id=154557
Bug ID: 154557
Summary: Inconsistencies in RANK() function in Calc
Product: LibreOffice
Version: 4.0.0.3 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Calc
Assignee: [email protected]
Reporter: [email protected]
There seem to be some inconsistencies in the RANK() function in Calc as of LO
7.4.6 (since at least LO 4.0, if not before that).
For the purpose of this report:
* Rank(Value;Data[;Type])
* L.Value is the minimum value in Data.
* G.Value is the maximum value in Data.
The following items are presented in increasing magnitude/importance of
problematic results (starting from "no problem" towards "serious problem").
0.1. When Value is "string" or refers to a string, then the result is #Value!.
This seems adequate.
0.2. When Value is "string" or refers to a string, and it is included in Data,
then the Ranks corresponding to (other) valid values in Data discard the
existence of the string value.
This seems adequate.
0.3. When Value refers to an empty cell, then the result is #Value!.
This seems adequate; although someone could argue in favor of a different
result such as #N/A.
1. When Value < L.Value, or when Value > G.Value, then the result is
#Value!.
IMO, it should be #N/A, as in other spreadsheet software tools.
2. When Type is a number <> zero, and when 'L.Value < Value > G.Value',
((and) Value is not listed in Data), the result is "-1" (without quotation
marks).
I couldn't find official Release Notes on this important change (which can
affect further calculations, preventing interoperability with other spreadsheet
tools). This result is not seen in LO 3.3, (nor in AOO, GSheets, Excel). Using
other spreadsheet software tools, this results in #N/A.
3. When Type = 0 (zero), and when 'L.Value < Value > G.Value', ((and) Value
is not listed in Data), the result is still a positive integer number, which is
INCORRECT!
4. When using RANK.EQ() instead of RANK(), when 'L.Value < Value > G.Value',
((and) Value is not listed in Data), the result is still a positive number,
which is INCORRECT! Moreover, when there are duplicate values in Data, the
results can fall beyond the maximum rank.
I'll be attaching a sample file soon.
--
You are receiving this mail because:
You are the assignee for the bug.