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

            Bug ID: 157421
           Summary: SUMIF() seems broken for A) single-cells/single-cell
                    ranges and B) non-matching non-trivial range criteria
           Product: LibreOffice
           Version: 7.5.6.2 release
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]

Description:
Motivation
----------
I have 2 columns:
- A contains a list of numbers (with empty cells in between).
- B contains the sum of all numbers in A up to and including the current row.

The formula for column B is easily created using the SUM() function. However,
when the cell in column A in the same row is empty, I need the B-cell to be
empty or show 0.

Thusly, I rewrote the simple SUM() formula using SUMIF(), like so:

  =SUMIF($Ax,"<>",$A$1:$Ax)

where x is the current row.


BUG
---
Alas, every way of employing SUMIF() gives wrong results, i.e. the results
differ from what I expect after reading

  https://wiki.documentfoundation.org/Documentation/Calc_Functions/SUMIF

For demonstration purposes, I attached an ODS file with 2 sheets: Sheet 1 is
close to the original use case, in Sheet 2, SUMIF() has a <SumRange> parameter.

I hope I have not misinterpreted the documentation. If so, I might file a
documentation bug. ;-)


Steps to Reproduce:
See attached file.

Actual Results:
See attached file.

Expected Results:
See attached file.


Reproducible: Always


User Profile Reset: No

Additional Info:
I am using Libreoffice 7.5.6.2 in Devuan (current stable, "Daedalus", based on
Debian 12), but I am confident that this is not a Devuan specific bug.

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

Reply via email to