[Libreoffice-bugs] [Bug 124710] IFS function erroneously propagates error results from functions within IFS (smallest reproducer in comment 6)

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Apr 17 15:09:19 UTC 2019


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

Winfried Donkers <winfrieddonkers at libreoffice.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|libreoffice-bugs at lists.free |winfrieddonkers at libreoffice
                   |desktop.org                 |.org
             Status|NEW                         |ASSIGNED

--- Comment #9 from Winfried Donkers <winfrieddonkers at libreoffice.org> ---
The cause is clear now (the 'error' NA() is propagated on the stack, causing
incorrect results in certain cases), the solution too (redesign of the function
to jump-type).
I will give it a try, it will probably take time.

A workaround is to avoid using parameters that can give errors as result, i.e.
use references that have been tested not to contain an error value.
In the formula given in description, that would mean putting
VLOOKUP(J9,$local_vlookup.A:C,2,0) in an unused cell, e.g. Z9, as follows:
IFERROR( VLOOKUP(J9,$local_vlookup.A:C,2,0), "ERROR OCCURRED:) and replace the
formula by
=IFS(
     OR(I9="pago",I9="reci"),Z9,
     AND(I9="tran",E9>0),"FT from",
     AND(I9="tran",E9<0),"FT to",
     1,"no idea"
    )

-- 
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/20190417/86386997/attachment.html>


More information about the Libreoffice-bugs mailing list