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

            Bug ID: 151426
           Summary: Feature request: extend IFERROR/IFNA to other
                    predicates
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: medium
         Component: Calc
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: obscur...@gmail.com

Description:
One great feature of LibreOffice over OpenOffice is the existence of IFERROR
and ISNA.

The documentation notes: `=IFERROR(X; Y)` is semantically equivalent to
`=IF(ISERROR(X); Y; X)`, except that the former case is more efficient because
`X` is only computed once.

This is an extremely common use pattern that is not limited to errors - it's
providing a default value when the result doesn't fit an expected type.

I have personal use cases for the equivalent of IFBLANK, IFNONTEXT,
IFNONNUMBER, and these shouldn't be too difficult to implement, giving a real
performance (and readability) benefit.

In a different direction, the complete generalization is validate-or-default,
which takes three arguments:

`VALIDATE(PRED, X, Y) === IF(PRED(X),X,Y)`

which guarantees X is evaluated once. This would subsume all of the above and
then some, provided function references exist.

Actual Results:


Expected Results:



Reproducible: Always


User Profile Reset: No



Additional Info:

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to