Issue 108991 - COUNTIF gives inconsistent counts of empty arrays
Summary: COUNTIF gives inconsistent counts of empty arrays
Status: CONFIRMED
Alias: None
Product: Calc
Classification: Application
Component: programming (show other issues)
Version: OOO320m12
Hardware: Unknown All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2010-02-05 16:48 UTC by foobaric
Modified: 2013-12-29 07:10 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Example sheet for issue 108991. The two COUNTIF functions giving inconsistent results are marked in red. (8.83 KB, application/vnd.oasis.opendocument.spreadsheet)
2010-02-05 16:52 UTC, foobaric
no flags Details
4.0 (top) vs. 2.4.3 (bottom) (119.45 KB, image/jpeg)
2013-08-16 14:28 UTC, Edwin Sharp
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description foobaric 2010-02-05 16:48:42 UTC
COUNTIF should count empty cells belonging to an array both as zero (0) and as
empty string (""). Therefore COUNTIF(<array>;0) and COUNTIF(<array>;"") should
yield the same results if the cells of <array> are empty (e.g. <array> {={||}}).
However, the upper left cell of the array is not counted as zero but is counted
as empty string, thus the results of both functions differ by one.

This problem was already observed before (see Issue 83917, last comment), but
not fixed at that time point. I initially encountered it in OOO310m19 but it is
still present in OOO320m12.
Comment 1 foobaric 2010-02-05 16:52:07 UTC
Created attachment 67658 [details]
Example sheet for issue 108991. The two COUNTIF functions giving inconsistent results are marked in red.
Comment 2 Edwin Sharp 2013-08-16 14:28:54 UTC
Created attachment 81343 [details]
4.0 (top) vs. 2.4.3 (bottom)
Comment 3 Edwin Sharp 2013-08-16 14:30:21 UTC
See attachment 81343 [details].

Rev. 1513819 Win 7