https://bugs.documentfoundation.org/show_bug.cgi?id=88737
Eike Rathke <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|medium |low Summary|XLSX: SQRT function on a |Array formula where the |range of values |argument range (partly) | |overlaps the formula range | |gives Err:522 (circular | |reference) Severity|normal |minor --- Comment #6 from Eike Rathke <[email protected]> --- Regarding my earlier comment 2, that was wrong, this case never worked in Calc. So, to recap, the situation here is that the array formula overlaps a region of the range its argument references, hence the circular reference error. This is not particular to SQRT, it would happen with any function taking a scalar value. Short reproducer: * in A1 enter 2 * select A2:A3 * enter array formula =SQRT(A1:A2) When the SQRT function is interpreted at A2, an array of the contents of A1:A2 is created, and at the position of A2 it is detected that a formula is running at that position. When the second element of the array formula in A3 is interpreted, that error is processed. This is a very rare situation and Excel seems to handle this differently. Apparently it processes each array formula part individually and obtains the argument's value of the formula in A3 after it already calculated A2, i.e. first A2:=SQRT(A1) then A3:=SQRT(A2) Handling this could mean having to rewrite, likely entirely, how Calc processes array formulas, something not done easily and error prone and IMHO not worth the effort for this twisted corner case. In the test case document 1 it would actually work if the formula in B3:F3 referenced B2:F2 instead of B2:F3. Now for the case that multiple columns are also involved, like in * in A1 enter 2 * in B1 enter 3 * select A2:B3 * enter array formula =SQRT(A1:B2) internally the other cells of the array formula reference the top left cell that actually will hold the result matrix, so while generating the argument array interpreting A2, when obtaining the value for B2 that also sees A2 already running so the circular reference error is propagated. I'm not sure if that part of the bug can be fixed without too much effort, need to investigate further. Again, this happens only if the argument's range overlaps the array formula range. -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ Libreoffice-bugs mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
