https://bugs.documentfoundation.org/show_bug.cgi?id=105847
Bug ID: 105847
Summary: SUMIF function gives unexpected / wrong results with
custom ranges
Product: LibreOffice
Version: 5.2.5.1 release
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Calc
Assignee: [email protected]
Reporter: [email protected]
Description:
Using the SUMIF() function with a "range" and a "sum_range" that do not use the
same row coordinates can give unexpected / erroneous results.
Steps to Reproduce:
1. Create a spreadsheet
2. Create a column with values for the test in SUMIF()
3. Create a column with values that will be summed by SUMIF(), i.e. the
sum_range
4. Create a formula using SUMIF(), in which the test range and the sum range
use different row coordinates (for example, whole column A:A for test range,
and partial column B2:B5 for sum range)
Actual Results:
In most cases, the result given will be unexpected / incorrect. No error is
returned.
Interesting exception where results are right: when the test range is the only
one that is restricted, and starts at the first row. (See rows 4 and 9 in
attached document.)
Expected Results:
- The function should perform the calculation on a restricted range (for
example, restrict the test range A:A to A2:A5 if the sum range is B2:B5, or
restrict the sum range B:B to B4:B10 if the test range is A4:A10).
OR
- Return an error code if this is not the expected usage of the function.
See in attached document several examples, and a comparison with how the
related function SUMIFS() behaves for the same conditions (an error code 502 is
returned if the ranges don't match).
Not sure if the severity should stay at "Major" or should be changed to
"Critical" as it can result silently result in erroneous calculations.
Testing on different versions (5.3 branch especially) and on other spreadsheet
software would be appreciated.
Reproducible: Always
User Profile Reset: No
Additional Info:
Version: 5.2.5.1
Build ID: 1:5.2.5~rc1-0ubuntu1~trusty0
CPU Threads: 2; OS Version: Linux 3.13; UI Render: default; VCL: gtk2;
Locale: en-GB (en_GB.UTF-8); Calc: group
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101
Firefox/51.0
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs