Bug 64387

Summary: Implement IFNA and IFERROR as defined in Open Document Format
Product: LibreOffice Reporter: David Lynch <dlynch1319>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED FIXED    
Severity: enhancement CC: dlynch1319, miguelangelrv
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:

Description David Lynch 2013-05-09 09:46:03 UTC
Implement IFNA and IFERROR as defined in Open Document Format for Office Applications 
http://docs.oasis-open.org/office/v1.2/cd05/OpenDocument-v1.2-cd05-part2.pdf

6.15.6 IFNA
Summary: Return X unless it is an NA, in which case return an alternative value
Syntax: IFNA( Any X ; Any Alternative )
Returns: Any
Constraints: None.
Semantics: Computes X. If ISNA(X) is true, return Alternative, else return X. Thus this is semantically equivalent to IF(ISNA(X); Alternative; X), except that X is only computed once. If X or Alternative is a cell reference to an empty cell, it is treated as the empty string "".


6.15.5 IFERROR
Summary: Return X unless it is an Error, in which case return an alternative value
Syntax: IFERROR( Any X ; Any Alternative )
Returns: Any
Constraints: None.
Semantics: Computes X. If ISERROR(X) is true, return Alternative, else return X. Thus this is semantically equivalent to IF(ISERROR(X); Alternative; X), except that X is only computed once. If X or Alternative is a cell reference to an empty cell, it is treated as the empty string "".
anchor:IFERROR

This will contribute towards LO compliance with the standards for OpenDocument Large Group Formula Evaluator. In addition since N() and T() now propagate errors, this will enable spreadsheets that no longer work to be enhanced without extensive rework (adding new columns or rows, or measures to avoid formula overflow and slowing down of the application due to double computation).
Comment 1 m_a_riosv 2013-05-09 11:11:03 UTC
Hi David,

the functions were added in 4.0
Comment 2 David Lynch 2013-05-09 12:08:42 UTC
Many thanks, with XOR  AVERAGEIF, SUMIFS, AVERAGEIFS and COUNTIFS too! I'll upgrade from 3.6.6 today