Bug 112115 - COUNTIF not counting non-blank cells
Summary: COUNTIF not counting non-blank cells
Status: CLOSED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.4.0.3 release
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-30 17:08 UTC by Philip Neaves
Modified: 2017-08-30 19:05 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Spreadsheet to resolve backups (19.91 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-08-30 17:08 UTC, Philip Neaves
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Neaves 2017-08-30 17:08:02 UTC
Created attachment 135877 [details]
Spreadsheet to resolve backups

I have a spreadsheet that counts NON blank cells.  It works in 5.3.4.2
but counts ALL cells in 5.4
Syntax example is:
=COUNTIF(D24:N24,"<>""")
I have attached the spreadsheet.
Delete a 'Y' and the counts go up to 11.
Comment 1 Eike Rathke 2017-08-30 19:05:31 UTC
Your formula does not count non-blank cells, it ("<>""") counts cells where the content is unequal to " a double quote. Note that within an inline literal string constant two double quotes "" represent one escaped double quote.

5.4 changed how empty cells are treated, ie. they are counted for "equals empty" ("=") or "not-equals not-empty" ("<>X") like other spreadsheet applications do.

To count non-empty cells your formula should have "<>" as criteria argument, eg. =COUNTIF(D24:N24,"<>")
Or compare to Y in your case, =COUNTIF(D24:N24,"=Y")