1. Create a new spreadsheet. 2. In A1, enter a number (e.g., 3) 3. In B1, enter formula `=MAXIFS(ROW($A$1:$A1);$A$1:$A1;3)` Expected: B1 should give `3`. Actual: it returns `Err:504` ("Error in parameters list"). Note that function wizard for B2 shows that first two parameters to MAXIFS return arrays ({3}), not scalars. When B1 is drag-copied downwards, i.e., the formula starts referencing more than a single row, it starts working correctly. Tested with Version: 6.1.0.3 (x64) Build ID: efb621ed25068d70781dc026f7e9c5187a4decd1 CPU threads: 12; OS: Windows 10.0; UI render: GL; Locale: ru-RU (ru_RU); Calc: CL
Hi Mike, That works when I write the formula this way: =MAXIFS($A$1:$A1;$A$1:$A1;3) Isn't it correct?
(In reply to Jacques Guilleron from comment #1) > That works when I write the formula this way: > =MAXIFS($A$1:$A1;$A$1:$A1;3) > Isn't it correct? Well, probably then my description is incorrect, and in reality the problem is that ROW() returns a scalar when used as argument for MAXIFS() with a single-element array? Still a problem all the same ;-)
Also reproduced in Version: 4.3.0.0.alpha1+ Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e LibreOffice 3.3.0 OOO330m19 (Build:6) tag libreoffice-3.3.0.4 @Eike, @Winfried, I thought you could be interested in this issue...
Taking.
Effectively MAXIFS(ROW($A$1:$A1);$A$1:$A1;3) is the same as MAXIFS(1;$A$1:$A1;3) where the first argument 1 (result of ROW($A$1:$A1)) is neither a range nor an array but a scalar value, which ScInterpreter::IterateParametersIfs() treats as error. That changes for ROW($A$1:$A2) which returns an array {1,2} In this case a scalar value should probably be treated the same as an array of 1x1 elements.
Btw, the expected result is 1 for that formula, not 3.
Eike Rathke committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=7d785183dda20942459616110bab041f9293a399 Resolves: tdf#119137 treat scalar non-reference non-array argument as matrix 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/59329 for 6-1
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=886b39fbd4f2401922b1c5af0a06ad09efb59d93&h=libreoffice-6-1 Resolves: tdf#119137 treat scalar non-reference non-array argument as matrix It will be available in 6.1.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.
Zdeněk Crhonek committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=e854848cc7b3ca484cb749ad2f92b203764e8b18 add test for tdf#119137 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.