<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:erack@redhat.com" title="Eike Rathke <erack@redhat.com>"> <span class="fn">Eike Rathke</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - ERROR.TYPE for "Search out of range" in Excel return 7 but in Calc #N/D"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=121488">bug 121488</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;">Version</td>
           <td>5.2 all versions
           </td>
           <td>Inherited From OOo
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - ERROR.TYPE for "Search out of range" in Excel return 7 but in Calc #N/D"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=121488#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - ERROR.TYPE for "Search out of range" in Excel return 7 but in Calc #N/D"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=121488">bug 121488</a>
              from <span class="vcard"><a class="email" href="mailto:erack@redhat.com" title="Eike Rathke <erack@redhat.com>"> <span class="fn">Eike Rathke</span></a>
</span></b>
        <pre>Calc has more detailed errors than Excel. In this case the Err:502
(IllegalArgument) is because the field index to VLOOKUP() is 2 but there is
only one field. Calc returns #N/A only if the lookup-value is not found in an
otherwise correct context. Excel seems to return #N/A in any error case of
VLOOKUP().

Actually ERROR.TYPE() returning #N/A can happen with any of the more detailed
Calc error values because there is no defined mapping (and can't be), which
exists only for the seven error values Excel knows. Mapping Err:502 to #N/A
(=7) is not a solution because in other (or most) context it may be #VALUE!
(=3) instead, or something else depending on what Excel returns for some
function's error (which in most cases #VALUE! isn't helpful at all).

This isn't really solvable unless we'd transport additional information with
each error what it might be in Excel in the given context just in case there
would be an ERROR.TYPE() evaluating it. Which I think would be overdone and I'd
rather close this as wontfix.</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>