COUNTIFS not working with multiple ranges

Single range A:
=COUNTIFS(M$14:M$16,">0")
Result: 3
Expected: 3

Single range B:
=COUNTIFS(M$19:M$21,">0")
Result: 3
Expected: 3

Multiple ranges A and B:
=COUNTIFS(M$14:M$16,">0",M$19:M$21,">0")
Result: 3
Expected: 6

Also note that changing one of the ranges to only be 2 cells throws Err: 502

Version: 7.5.4.2 (X86_64) / LibreOffice Community
Build ID: 36ccfdc35048b057fd9854c757a8b67ec53977b6
CPU threads: 8; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

Please upload a real, ODF type sample file here,
and try to use the regular formula separator character of the LibreOffice Calc: the semicolon ;
(The comma is the decimal separator in many languages.)

COUNTIFS

Countifs.ods (11,2 KB)

3 Likes

If you want add the results of the two cell ranges, you need some similar formula:

=COUNTIF(M$14:M$16;">0")+COUNTIF(M$19:M$21;">0")
1 Like

Also could use: =COUNTIF((M$14:M$16~M$19:M$21);">0")

5 Likes