Bug 104646 - Sumifs is not summing up if a criteria left blank
Summary: Sumifs is not summing up if a criteria left blank
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.2.3.2 rc
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-13 15:28 UTC by p_kongstad
Modified: 2016-12-13 22:13 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Issue showing issue with sumifs (9.53 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-12-13 15:28 UTC, p_kongstad
Details

Note You need to log in before you can comment on or make changes to this bug.
Description p_kongstad 2016-12-13 15:28:48 UTC
Created attachment 129592 [details]
Issue showing issue with sumifs

What happens:

If you have a sumifs with as an example 2 criteria and one if left blank both in the criteria and the range, this will not sum up.

Expected behaviour:
The sumifs should sum up even if blank cells when both the criteria and range contains a blank value.

Seems that the function always will have to have a value to sum in sumifs.

How to test:

1. In an empty spreadsheet we enter columns with

Index			Index		
1	a	10	1	a	10
2	b	11	2	b	11
2	c	12	2	c	12
2	d	13	2	d	13
4	e	14	4	e	14
5	f	15	5	f	15
6	g	16	6	g	16
7	h	17	7	h	17
8		0	8		18

2. In column B enter the formula:
=SUMIFS(F$2:F$10,D$2:D$10,A2,E$2:E$10,B2)

3. Copy it down.

4. In row 8 no value is summed in column B which is due to B/8 and E/8 are left blank. Expected value 18.

Test sheet attached.
Comment 1 m_a_riosv 2016-12-13 15:49:16 UTC
A blank cell it's not the same than an empty string, B2 it's used as zero,
you can force an empty string with a formula like:

=SUMIFS(F$2:F$10,D$2:D$10,""&A10,E$2:E$10,""&B10)

that works for me.

You can test your formula putting a zero on E8.
Comment 2 p_kongstad 2016-12-13 16:14:26 UTC
Could you please explain why this is implemented like this?

You are comparing 2 cells which are identical in this case blank and I expected it to return the value.

Your workaround is solving the issue, but still I find this being a little bit odd.

Thank you in advance.