Logiceasy

IFERROR()

Returns the first argument if it isn't an error; otherwise returns the second.

Syntax
fx
=IFERROR(value, [value_if_error])
Arguments
ArgumentDescription
valueThe value to return if it is not an error.
[value_if_error]The value the function returns if value is an error. Defaults to empty.
Example
fx
=IFERROR(A1/B1, 0)

Paste this into Google Sheets to run it. The live playground on this site covers 24 of the 61 functions, and IFERROR isn't one of them yet.

Common pitfalls

  • Catches every error type indiscriminately. To handle only #N/A, prefer IFNA so you don't mask real bugs.
  • Omitting the second argument returns an empty string on error, which can hide silent failures during debugging.
  • Don't pre-emptively wrap every formula: it makes errors invisible and harder to track down.
Related formulas
IFNA()
Returns the first argument unless it is the #N/A error, in which case returns the second.
IF()
Returns one value if a condition is TRUE, another if FALSE.
IFS()
Evaluates multiple conditions and returns a value for the first TRUE.
Used by
IF()
Returns one value if a condition is TRUE, another if FALSE.
IFNA()
Returns the first argument unless it is the #N/A error, in which case returns the second.
ISBLANK()
Returns TRUE if a cell is empty.
ISNUMBER()
Returns TRUE if a value is a number; useful for guarding numeric expressions.
ISTEXT()
Returns TRUE if a value is a text string.