<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:winfrieddonkers@libreoffice.org" title="Winfried Donkers <winfrieddonkers@libreoffice.org>"> <span class="fn">Winfried Donkers</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED - IFS function erroneously propagates error results from functions within IFS (smallest reproducer in comment 6)"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=124710">bug 124710</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Assignee</td>
           <td>libreoffice-bugs@lists.freedesktop.org
           </td>
           <td>winfrieddonkers@libreoffice.org
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>ASSIGNED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED - IFS function erroneously propagates error results from functions within IFS (smallest reproducer in comment 6)"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=124710#c9">Comment # 9</a>
              on <a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED - IFS function erroneously propagates error results from functions within IFS (smallest reproducer in comment 6)"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=124710">bug 124710</a>
              from <span class="vcard"><a class="email" href="mailto:winfrieddonkers@libreoffice.org" title="Winfried Donkers <winfrieddonkers@libreoffice.org>"> <span class="fn">Winfried Donkers</span></a>
</span></b>
        <pre>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"
    )</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>