Skip to content

IFERROR() does not catch errors from cell references #273

Description

@ggyuchive

What happened:

=IFERROR(expr, fallback) should return fallback whenever expr evaluates to any #…! error. Wafflebase returns the fallback for direct errors (e.g. =IFERROR(1/0, "x")) but lets errors leak through when expr is a cell reference whose value is an error sentinel.

What you expected to happen:

IFERROR should detect the error regardless of whether it is the immediate result or read via a cell reference. Same for IFNA.

How to reproduce it (as minimally and precisely as possible):

Setup: Cell A1 contains =1/0 (so A1 displays #DIV/0!).

Cell Formula Expected Actual Status
B1 =IFERROR(1/0, "fallback") fallback fallback
B2 =IFERROR(A1, "fallback") fallback #DIV/0!
B3 =IFNA(NA(), "fallback") fallback fallback
B4 =IFNA(A1, "fallback") #DIV/0! #DIV/0!

Anything else we need to know?:

Environment:

  • Operating system:
  • Browser and version:

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomerssheetsRelated to wafflebase sheets component

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions