Description: Commands like =ZÄHLENWENN(B11:B85;"<>0") or =COUNTIF(D11:D85;"<>0") count also empty fields. Fields which contain 0 are not counted (correct) Fields which contain nothing are counted (wrong) Steps to Reproduce: Create a new Calc file Select field A1 Enter command like =ZÄHLENWENN(B11:B85;"<>0") or =COUNTIF(D11:D85;"<>0") Result is 75 even if all fields are empty Actual Results: 75 Reproducible: Always User Profile Reset: No Additional Info: [Information automatically included from LibreOffice] Locale: de Module: SpreadsheetDocument [Information guessed from browser] OS: Windows (All) OS is 64bit: no
I'm not quite sure it's a bug. OpenDocument v.1.2 documentation on COUNTIF (part 2, 6.13.9) [1] refers to 4.11.8 Criterion; and that section tells this: > Note: "=0" does not match empty cells. ... which might imply that "<>0" does match empty cells as negation of "=0"... Maybe Eike has a better explanation. [1] http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#__RefHeading__1018360_715980110
On windows 7 x64 with Version: 6.0.7.3 (x64) Build ID: dc89aa7a9eabfd848af146d5086077aeed2ae4a5 CPU threads: 3; OS: Windows 6.1; UI render: default the outcome is 0. On windows 10 with Version: 6.2.1.2 (x64) Build ID: 7bcb35dc3024a62dea0caee87020152d1ee96e71 CPU threads: 2; OS: Windows 10.0; UI render: default; VCL: win the outcome = 75. So what is the correct outcome ?
the implementation changed with LO 6.1.3 fixing issue: COUNTIF with criterium <>number does not count empty cells. https://bugs.documentfoundation.org/show_bug.cgi?id=73081
So, the reported behavior is correct and consistent with standard -> NOTABUG. Thanks for your report! A report that turns out not a bug is way better than not reporting what could be a real problem.