Excel
IFERROR function in Excel
Returns a value you specify if a formula evaluates to an error; otherwise, returns the result of the formula
=IFERROR(value, value_if_error)IFERROR syntax and parameters
Two arguments, two required.
- valueanyRequired
The argument that is checked for an error.
- value_if_erroranyRequired
The value to return if the formula evaluates to an error. The following error types are evaluated: #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL!.
IFERROR examples
Formulas you'll actually reuse.
A lookup that says so instead of #N/A when the key is missing:
=IFERROR(VLOOKUP(F2, A2:D200, 4, FALSE), "Not found")Result
"Not found"A ratio that reads as zero when the divisor is blank (#DIV/0!):
=IFERROR(D2 / C2, 0)Result
0
IFERROR in Google Sheets
Same name — your formula ports as-is.
Try IFERROR in the playground
Edit the example — nothing to install.
Preloaded with the IFERROR formula from Example 1 — change anything and watch it respond.
Loading the editor…
Related functions
More ways Excel gets this done.
- ANDReturns TRUE if all of its arguments are TRUELogicalGoogle Sheets
- BYCOLApplies a LAMBDA to each column and returns an array of the resultsLogicalGoogle Sheets
- BYROWApplies a LAMBDA to each row and returns an array of the resultsLogicalGoogle Sheets
- FALSEReturns the logical value FALSELogicalGoogle Sheets
- IFSpecifies a logical test to performLogicalGoogle Sheets
- IFNAReturns the value you specify if the expression resolves to #N/A, otherwise returns the result of the expressionLogicalGoogle Sheets