Bug 148983 - MULTIPLE.OPERATIONS fail with Err:504 when the input cell is *part* of the range used in formula cell directly
Summary: MULTIPLE.OPERATIONS fail with Err:504 when the input cell is *part* of the ra...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL: https://ask.libreoffice.org/t/calc-ge...
Whiteboard:
Keywords:
Depends on:
Blocks: Cell-Formula
  Show dependency treegraph
 
Reported: 2022-05-08 10:39 UTC by Mike Kaganski
Modified: 2023-05-13 11:50 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2022-05-08 10:39:41 UTC
In a new Calc document:

1. Put number '1' to A1, A2, A3 and A4
2. Put formula '=SUM(A1:A4)' to A5
3. Put number '2' to B1
4. Select B1:C1, and call Data->Multiple Operations
5. Put 'A5' to dialog's "Formulas", and 'A2' to "Column input cell", and click OK.

=> C1 shows Err:504.

It depends on the range used in the A5 formula. Having the formula changed to '=SUM(A2:A2)' (note that it also uses reference to a range including the input cell, but only that cell!), or to '=SUM(A3:A4)' makes it function OK. Seems like the range gets "broken" when we use another cell for updated value for some cell inside the range.

Also repro using OOo 3.3.0.
Comment 1 Mike Kaganski 2022-05-08 11:19:23 UTC
This one likely is a duplicate of bug 130722.
Comment 2 Regina Henschel 2022-05-08 13:21:26 UTC
"A cell, which contains the current value must not depend on cells which are used in the sample calculation, neither directly nor indirectly."

https://wiki.documentfoundation.org/Documentation/Calc_Functions/MULTIPLE.OPERATIONS/en
Comment 3 Mike Kaganski 2022-05-08 13:23:42 UTC
(In reply to Regina Henschel from comment #2)

I'm sorry, how is that related?
"A cell, which contains the current value" is the "RowReplacement" or "ColumnReplacement", and it is a *fixed value* cell in the example here.
Comment 4 Regina Henschel 2022-05-08 13:26:08 UTC
*** Bug 148982 has been marked as a duplicate of this bug. ***
Comment 5 Regina Henschel 2022-05-08 14:15:31 UTC
Sorry Mike, you are right. Generated formula is =MULTIPLE.OPERATIONS(A$5;$A$1;$B1).
It seems, that it is not possible, that the variable cell $A$1 is part of a range used in the sample calculation, here A1:A4. Changing A5 to =A1+sum(A2:A4) works.