Formula guide · Excel and Google Sheets · Updated May 13, 2026
IFERROR Formula
Use IFERROR to show a clean fallback when a formula returns an error.
Quick Answer
Wrap a formula in IFERROR when a clear fallback message is better than a raw spreadsheet error.
Copyable Formula
=IFERROR(XLOOKUP(E2,A2:A8,C2:C8),"Not found")
Syntax
=IFERROR(value, value_if_error)
Excel and Google Sheets
Worked Example
| E | Result |
|---|---|
| Lookup SKU | Output |
| A-999 | Not found |
Result: Returns Not found instead of #N/A when the lookup value has no match.
Steps
- Write the formula that might error.
- Wrap it in IFERROR.
- Choose a fallback that helps the user understand what happened.
Common Mistakes
- Hiding important errors with a blank fallback.
- Using IFERROR before understanding why the error happens.
- Masking broken formulas in financial or operational reports.
Excel vs Google Sheets Notes
The core idea works in both Excel and Google Sheets, but separators, function availability, and array behavior can vary by account, locale, and version.
Editorial check: This guide was last updated May 13, 2026. Formula behavior can vary by Excel version, Google Sheets rollout, and spreadsheet locale.