[Libreoffice-bugs] [Bug 107369] Enhancement to Calc function SUBSTITUTE

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Nov 20 13:48:42 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=107369

--- Comment #9 from Eike Rathke <erack at redhat.com> ---
(In reply to David Lynch from comment #7)
> I don't understand this. Other Libreoffice functions, such as ROW and
> COLUMN, can take either scalar or array arguments and behave appropriately.
Fwiw, SUBSTITUTE also behaves appropriately,

  =SUBSTITUTE("abcde",{"a";"b"},{"x";"y"},1)

as array formula returns an array of two elements {"xbcde";"aycde"}
where in each iteration for Text the first occurrence of SearchText[i] is
replaced with NewText[i] to form a result element.

This is the same behaviour as for other functions and operators that take
scalar arguments, i.e. iterate over arguments arrays and return a result array,
it just is not what you desired it did in your special case. For your example
of ROW, =ROW(A11:A13) in array evaluation returns an array of 3 elements
{11;12;13} which is not different behaviour. Or
=CONCATENATE({"a";"b"},{"x";"y"}) => {"ax";"by"}

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20181120/45467875/attachment.html>


More information about the Libreoffice-bugs mailing list