EXCEL SOLUTIONS

IFERROR function in Excel

Shows a friendly result instead of an error such as #N/A or #DIV/0!.

IntermediateLogic

Syntax

=IFERROR(value, value_if_error)
Arguments of IFERROR
ArgumentWhat it means
valueThe formula to try.
value_if_errorWhat to show if it returns an error.

Examples with results

Every result below is calculated by the practice engine on the sample data shown, not typed in by hand.

Examples that need no data

  • =IFERROR(10/0,"Check the divisor")Check the divisor

    Division by zero turned into a message

Price list (fictional)

RowABC
1CodeProductPrice
2P-101Desk lamp24.9
3P-102Notebook3.5
4P-103Mouse15
5P-104Keyboard32
6P-105Monitor stand21
Price list (fictional) Row 1 holds the headings. All data is fictional. Dates are year-month-day.

Download CSV

  • =IFERROR(VLOOKUP("P-999",A2:C6,3,FALSE),"Not found")Not found

    A code that is not in the list

Try it yourself

Change the formula or switch to other sample data.

Press Calculate to see the result.

The practice box runs in your browser with BDK’s own calculator, which covers about 60 common functions. Cell references work as in Excel (B2, B2:B9). Your formulas are not saved or sent anywhere. For anything unusual, check the result in Excel itself.

How people use IFERROR at work

  • Marketing

    Conversion rate when a campaign has no leads yet.

    =IFERROR(D2/C2,0)0.15
    Data: Marketing campaigns (fictional)
  • Sales

    Look up a price and show a note if the code is wrong.

    =IFERROR(VLOOKUP("P-104",A2:C6,3,FALSE),"Unknown code")32
    Data: Price list (fictional)

Common mistakes and tips

  • IFERROR hides every error, including real mistakes in your formula. Only use it where you expect a specific problem.

Works in

All versions of Excel, and Google Sheets.

Related formulas

IFVLOOKUP

Lessons that use it

Need Something Different? Let’s Talk.

Looking for different features or something built around your workflow? Share your idea with us.