Bug 122321 - countif function incorrectly counts empty cells when using "=0" or "<>0" criteria
Summary: countif function incorrectly counts empty cells when using "=0" or "<>0" crit...
Status: RESOLVED DUPLICATE of bug 121696
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
Depends on:
Reported: 2018-12-25 15:03 UTC by Andrzej
Modified: 2018-12-25 15:42 UTC (History)
0 users

See Also:
Crash report or crash signature:
Regression By:


Note You need to log in before you can comment on or make changes to this bug.
Description Andrzej 2018-12-25 15:03:11 UTC
Open new calc sheet.
Left column A empty
In cell A2 type function =countif($A$1:$A$2;"<>0")
In cell A3 type function =countif($A$1:$A$2;"=0")
Criteria "<>0" (cell A2) is 2 should be 0
Criteria "=0" (cell A3) is 0 should be 2
Till version 6.1.2 was correct.

Steps to Reproduce:
1. Open new calc sheet.
2. Left column A empty
3. In cell A2 type function =countif($A$1:$A$2;"<>0")
4. In cell A3 type function =countif($A$1:$A$2;"=0")
5. Check the results

Actual Results:
countif($A$1:$A$2;"<>0") = 2
countif($A$1:$A$2;"=0") = 0

Expected Results:
countif($A$1:$A$2;"<>0") = 0
countif($A$1:$A$2;"=0") = 2

Reproducible: Always

User Profile Reset: No

Additional Info:
Version: (x64)
Build ID: 9d0f32d1f0b509096fd65e0d4bec26ddd1938fd3
Threads CPU: 8; OS:Windows 6.1; UI render:default; 
Regional settings: pl-PL (pl_PL); Calc: group threaded

Results was correct in version 6.1.2.
Comment 1 himajin100000 2018-12-25 15:42:28 UTC

*** This bug has been marked as a duplicate of bug 121696 ***