Google Sheets functions / Logical
Logical function · Google Sheets
IFERROR function
IFERROR returns a value you choose when a formula produces an error. It keeps reports clean, though it can also hide real problems when used too widely.
Arguments
| Argument | Required | Meaning |
|---|---|---|
| value | Yes | The formula to test. |
| value_if_error | Yes in Excel | The result to show on error. Optional in Sheets. |
Worked example
| A | B | |
|---|---|---|
| 1 | Revenue | Units |
| 2 | 1200 | 40 |
| 3 | 900 | 0 |
=IFERROR(A3/B3,0)Result: 0
Dividing 900 by 0 returns #DIV/0!, so IFERROR shows 0 instead.
Try it
Edit the formula and run it against the table above. Results come from a browser spreadsheet engine.
Availability
| Platform | Status |
|---|---|
| Excel | All current desktop versions, Microsoft 365, Excel for the web. |
| Google Sheets | Available. |
Common mistakes
- It hides every error type, including a misspelled name or a broken reference.
- Use IFNA when only a missing lookup value should be handled.
Do it with AI
Paste this prompt into Copilot, Gemini or another assistant. Check the result on a small sample first.
Wrap this formula so only a missing lookup shows "Not listed", and every other error stays visible: =VLOOKUP(F2,A2:C5,3,FALSE)