How IFERROR works
Syntax
=IFERROR(formula, value_if_error)formula- The calculation that might fail.
value_if_error- What to show instead: 0, "", or a message like "Not found".
Example
You look up a client's balance with XLOOKUP, but some clients aren't in the list yet.
=IFERROR(XLOOKUP(A2, Clients!A:A, Clients!D:D), "New client")Shows the balance, or "New client" instead of #N/A.
Common mistakes
- Wrapping everything in IFERROR. It also hides real mistakes, like a typo in a range.
- Returning 0 where a blank is better: zeros pull averages down. Use "" for "nothing to show".
Questions people ask
What is the difference between IFERROR and IFNA?
IFNA only catches #N/A (a lookup that found nothing) and lets other errors show, which is safer for lookups.
Practice it above: type the formula in the formula bar and press Enter to check.