Description: In a list of values that come from cell references in another table an empty value in the referenced cell will not be counted when using e.g. ANZAHL2(A1:C1) as expected. However if I use ANZAHL2(A1;B1;C1) it is counted which I would NOT expect. See MWE Steps to Reproduce: 1.Open new file 2.Enter Values in Table2: A1=1 B1=<empty> C1=3 3.Enter cell references in Table1: A1=Table2.A1 B1=Table2...etc 4.In Table1 enter in (say) A4 =ANZAHL2(A1:C1) and in A5 =ANZAHL2(A1;B1;C1) Actual Results: Table1.A4 contains 2 Table1.A5 contains 3 Expected Results: Table1.A5 should imho contain 2 Reproducible: Always User Profile Reset: No Additional Info: Version: 5.1.6.2 Build-ID: 1:5.1.6~rc2-0ubuntu1~xenial3 CPU-Threads: 4; BS-Version: Linux 4.4; UI-Render: Standard; Gebietsschema: de-DE (de_DE.UTF-8); Calc: group User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0
Created attachment 142727 [details] Minimum Working Example as described in the report
It's certainly a bug that both variants return different results, but the result should be 3 in both cases, not 2, because none of the cells in the range are empty. It also doesn't need different sheets, a simple example A1: =COUNTA(A2:A3) A2: =B2 gives 0 instead of 1. Entering any value in B2 yields 1. Apparently the "empty cell inherited" status in A2 is considered as empty.
Eike Rathke committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=cfe2e4eb835c06b24adabd60c7a3fddbd3f4dbc9 Resolves: tdf#118161 use ScCellIterator::isEmpty() for COUNTA() It will be available in 6.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Pending review https://gerrit.libreoffice.org/55803 for 6-1 https://gerrit.libreoffice.org/55804 for 6-0
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-6-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=9bec4997fe6bceabf381e07793d2c8ba38ee19da&h=libreoffice-6-1 Resolves: tdf#118161 use ScCellIterator::isEmpty() for COUNTA() It will be available in 6.1.0.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-6-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=32bcda269b07a88cecbb5a2fde10d4b4d7ce7538&h=libreoffice-6-0 Resolves: tdf#118161 use ScCellIterator::isEmpty() for COUNTA() It will be available in 6.0.6. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
its working with Version: 6.1.0.0.beta2+ Build ID: 9bec4997fe6bceabf381e07793d2c8ba38ee19da CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; Locale: nl-BE (en_US.UTF-8); Calc: group threaded
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-6-0-5": http://cgit.freedesktop.org/libreoffice/core/commit/?id=55af68aa8929f984075fd0ae762634cde1ed29d2&h=libreoffice-6-0-5 Resolves: tdf#118161 use ScCellIterator::isEmpty() for COUNTA() It will be available in 6.0.5. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
The fix for this issue is already covered by sc/qa/unit/data/functions/fods/reference_operators.fods