Version: 1.5-beta1 (using KDE KDE 3.5.1) Installed from: Slackware Packages I have a range of cells that may be empty or contain numerical values from 0 and up (no decimals). I want to to count separately the cells with the value 0. Using COUNTIF(range; "0") counts cells with 0 and also blank cells. I have to use COUNTIF(range; "0")-COUNTBLANK(range) to get the result I want. The behavior in KSpread is inconsistent with OOo Calc where COUNTIF(range; "0") gives the expected result. To count the rest of the non-blank cells in my range I use COUNTIF(range; ">0") which behaves as expected.
SVN commit 510130 by mecir: Condition functions should not match on empty cells. Patch by Alfredo Beaumont - alfredo.beaumont at gmail dot com BUG: 121772 M +2 -0 valuecalc.cc --- trunk/koffice/kspread/valuecalc.cc #510129:510130 @@ -1928,6 +1928,8 @@ bool ValueCalc::matches (const Condition &cond, Value val) { + if (val.isEmpty()) + return false; if (cond.type == numeric) { double d = converter->asFloat (val).asFloat(); switch ( cond.comp )