Applies To
Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web

The IFERROR function wraps a formula to trap and handle errors in the formula. On an error, it returns a value you specify, otherwise it returns the result of the formula.

IFERROR( formula, value_if_error )

Example 1: Traps for divide by zero, replaces with verbose message: =IFERROR( B12/C12), "Divide by zero") 

Example 2: Traps a VLOOKUP function error, returns "Investigate": =IFERROR(VLOOKUP(D1,A1:C3,4,FALSE),"Investigate")

For more info, see IFERROR function.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.