What is IFERROR in Google Sheets?
IFERROR wraps another formula and returns value_if_error when the inner expression hits any error, including #N/A, #REF!, #VALUE!, and #DIV/0!. Use it for polished dashboards. Fix the root cause when the error signals bad data you should clean.
When to use it
Use IFERROR when lookups may miss, ratios may divide by zero, or imports may break mid-model and you want a friendly blank or message on a report tab.
When to skip it
Skip IFERROR as a blanket fix on every cell. It can hide fixable #VALUE! or #REF! bugs. For lookup #N/A only, IFNA is clearer and leaves other errors visible.
How it works
-
1
Wrap the risky formula as the first argument: IFERROR(VLOOKUP(...), "Not found").
-
2
Provide value_if_error: blank text "", zero, dash, or a short user-facing note.
-
3
IFERROR catches all error types, not just #N/A.
-
4
Place IFERROR on the outermost function when nesting several lookups.
-
5
Pair with data validation upstream so fewer errors reach the formula layer.
-
6
Log or flag repeated fallbacks on a QA tab instead of silently swallowing every failure.
Examples in Google Sheets
Lookup with fallback
=IFERROR(VLOOKUP(A2, Products!A:C, 3, FALSE), "Unknown SKU") shows a label when the key is missing.
Ratio without #DIV/0!
=IFERROR(Clicks/Visits, "") leaves the cell blank when Visits is zero.
Import range guard
=IFERROR(IMPORTRANGE(Url!A1, "Data!A:Z"), "Check access") surfaces permission problems on a staging tab.
Better Sheets resources
Common mistakes
-
Wrapping entire models in IFERROR so #REF! from a deleted column never surfaces during edits.
-
Using IFERROR when IFNA would preserve visibility into real #VALUE! mistakes.
-
Returning 0 on error in financial ratios, which looks like real zero performance.
-
Nesting IFERROR layers so debugging which inner function failed takes forever.
-
Replacing data cleanup with IFERROR on imported text numbers that should be fixed once.
Frequently asked questions
- IFERROR vs IFNA?
- IFERROR catches every error type. IFNA only replaces #N/A, which is common after VLOOKUP or XLOOKUP misses.
- IFERROR vs IF(ISERROR())?
- IFERROR is shorter. Older patterns used IF(ISERROR(expr), fallback, expr) before IFERROR existed.
- Does IFERROR slow recalc?
- Slightly on heavy sheets, but usually less painful than broken dashboards full of red errors.
- IFERROR with ARRAYFORMULA?
- Yes. Wrap the array expression so each spilled cell gets the same fallback behavior.
- What errors does IFERROR not catch?
- It does not catch logical FALSE, blank cells, or text that merely looks wrong without an error code.
- IFERROR vs IF test for zero?
- Divide by zero is an error IFERROR catches. A zero denominator you expect should use IF instead.
- Should reports use IFERROR?
- Yes on presentation tabs. Keep raw calculation tabs unwrapped so analysts see real errors.
- IFERROR with QUERY?
- Wrap QUERY when the query string or source range may fail during template setup.
Related Tutorials
Watch how IFERROR works
Most Common Errors and How To Handle Them in Google Sheets
Google Sheet Basics - The Absolute Basics
Related blog posts
Guides that explain IFERROR in more depth.
Most Common Errors and How To Handle Them in Google Sheets
Most Common Errors and How To Handle Them in Google Sheets #N/A error #REF! error #NAME? error #DIV/0! Error #VALUE! Error #NUM! error #NULL! error
Read post →Automate Google Sheets without Apps Script, without Zapier
I've been doing a lot in spreadsheet automation using Apps Script. But I wanted to go back to some formulas that I think feel like magic. They make me feel like a wizard without having to code.
Read post →How to Gain Confidence in Google Sheets
Building confidence in Google Sheets, and yourself is essential. It's benefits include: streamlining your workflow, ensuring data accuracy, and maximizing your productivity. If you’ve ever felt overwhelmed or unsure about using Google Sheets, this guide is here to help. Let’s explore some practical tips and strategies to boost your confidence and become a Google Sheets pro. I'll show you where you can find help inside and outside of Google Sheets. 👍Better Sheets Members can email me anytim...
Read post →Related terms
IF
IF evaluates a logical test and returns value_if_true when the test passes, otherwise value_if_false. It is the basic branching function for labels, safe division, and simple approvals before you reach for IFS or lookup tables.
Read guide →#N/A error
#N/A means not available: the formula ran but could not find a match. Lookup functions return #N/A when a key is missing from the table. Sometimes that is correct. Often it signals typos, extra spaces, or numbers stored as text.
Read guide →#REF! error
#REF! means a formula references a cell or range that no longer exists. Common causes include deleted rows or columns, removed sheets, broken IMPORTRANGE, or cut-paste that orphaned an address. The error spreads to every dependent formula until you repair the link.
Read guide →VLOOKUP
VLOOKUP searches the first column of a range for a key and returns a value from a specified column to the right. It is still everywhere in legacy templates even as XLOOKUP offers more flexible replacements.
Read guide →Done reading about IFERROR?
Membership unlocks 600+ tutorials, unlimited generators, and every template. Practical lessons. Zero fluff.
Need this once
Jump to a free tool or a single tutorial for this topic.
Learning Sheets for real
Unlock the full library, generators, and templates with membership.