Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


Hi Winfried,

On Monday, 2015-02-02 13:08:54 +0100, Winfried Donkers wrote:

With IFERROR and IFNA these situation should return an empty value to be compatible with Excel.
AFAIK also Excel does not allow a null argument for IFERROR() second parameter, but I'm not 
sure, I'd have to check.

Ok, I tried and it does allow the second argument to be nil.

Excel replaces an empty argument with an empty value, that is to say, the function description 
says 
'If value or value_if_error is an empty cell, IFERROR treats it as an empty string value ("").'

That's not what Excel does.
* If the first argument ('value') is a reference to an empty cell it is
  simply propagated through because it is not an error.
* If the second argument ('value_if_error') is a reference to an empty
  cell in an error case the empty cell is returned.

Empty cell versus empty string is specifically a difference when
displaying or further processing the return value, e.g.
=IF(IFERROR(A2,)=0,23,42) and
=IF(IFERROR(A2,)="",23,42) and
=IF(IFERROR(A2,A3)=0,23,42) and
=IF(IFERROR(A2,A3)="",23,42)
in Excel all evaluate to 23 if A2 is empty or contains an error and A3
is empty. If IFERROR returned an empty string in any of these cases the
corresponding comparison with numeric 0 would result in FALSE.

and =IFERROR(1/0;) returns an empty cell, not an error message.

This is correct and voids my earlier proposal to propagate the ocMissing
token through in the final result. Actually we need to pop an ocMissing
and push an ScEmptyCellToken in such case.

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/
Care about Free Software, support the FSFE https://fsfe.org/support/?erack

Attachment: pgprtfPSxBAZJ.pgp
Description: PGP signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.