Description: Selecting a range and looking for the max value gives 0 when all the values are <0, not the greatest negative value Steps to Reproduce: 1. set a column with title "Zone2" for example 2. set aside a column with <0 numbers 3. place in a cell the title from first column 4. place in a cell forumla Actual Results: value is 0 Expected Results: value is the max available value. It works fine with MIN.SI and positive values Reproducible: Always User Profile Reset: No Additional Info: User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0
Created attachment 133358 [details] Screenshot of an example with formula and data columns to highlight the situation
Created attachment 133359 [details] full file that gives bad results for MAX.SI function the full .ods file wher I got the bug for MaX.SI function (but not for MIN.SI)
With LO 5.3.3 on Win7, I could reproduce this.
Confirmed also xith this file on Version: 5.2.6.2 (Build ID: 1:5.2.6-2~bpo8+1) OS :Linux 4.5; VCL : kde4; Locale : fr-FR (fr_FR.UTF-8); Calc: group Is ti possible to also tag this version with the bug or 5.3.2.2 is enough to cover previous ones on other OS?
Version field must correspond to the earliest affected version.
I submitted a patch for review on master: https://gerrit.libreoffice.org/#/c/37693/
Julien Nabet committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=20d3a60b41bda2513723c145d919f584840b1056 tdf#107892: fix negative values case with maxifs It will be available in 5.4.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.
Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-5-3": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f6d7bd1f525d3930c48b61abb2e91418f2c66ca5&h=libreoffice-5-3 tdf#107892: fix negative values case with maxifs It will be available in 5.3.4. 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.
Zdeněk Crhonek committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=53fd8223b73c683e9e4d92b2ad3aabed368eff0e tdf#107892 add MAXIFS test It will be available in 5.4.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.