The IFERROR function

Returns a value you choose when a formula gives any error, and the formula result otherwise.

Syntax

IFERROR(value, value_if_error)
value
The formula to check.
value_if_error
What to show instead of an error, such as 0 or "Not found".

Examples

B1=IFERROR(10/0,0)
AB
10

In plain words: Divide 10 by 0, and if that gives an error, show 0 instead.

D1=IFERROR(VLOOKUP("Kiwi",A2:B4,2,FALSE),"Not found")
ABCD
1FruitPriceNot found
2Apple4
3Pear6
4Plum5

Practice IFERROR

Read the guide

Questions

Should I use IFERROR or IFNA?

IFNA only catches #N/A, the error a lookup gives when nothing matches. IFERROR also hides real mistakes such as #REF! or #NAME?, so prefer IFNA around lookups.

Related functions