IFERROR in Excel

IFERROR in Excel

3 mins readComment
Rashmi
Rashmi Karan
Manager - Content
Updated on May 7, 2025 09:49 IST

When applying formulas in an Excel spreadsheet, some error values ​​are bound to be generated. Excel provides a useful function to handle these errors: the IFERROR function. The IFERROR function returns a custom result when a formula evaluates to an error and returns a normal result when no error occurs. Check out how IFERROR works in Excel in our blog, and understand with examples.

IFERROR in MS Excel

What is IFERROR in Excel?

The Excel IFERROR function helps to manage errors that may occur in formulas. It substitutes a value in case it finds an error. Rather than presenting error messages like #DIV/0!, #N/A, or #VALUE!, the IFERROR function allows you to substitute the errors with more user-friendly results—such as text ("Not Available") or a certain numeric value (e.g., 0).

IFERROR allows spreadsheets to appear more presentable and simpler to interpret, particularly while collaborating with other teams or implementing them within dashboards or reports.

The use of IFERROR in Excel is as follows: 

  • Identifying and dealing with formula errors
  • Replacing typical error messages with the output
  • Ensuring the logical continuity of data processing, even where specific cells may be full of errors
Recommended online courses

Best-suited MS Excel courses for you

Learn MS Excel with these high-rated online courses

Free
5 hours
Free
7 hours
Free
7 hours
Free
20 hours
9.6 K
21 hours
Free
4 hours
Free
– / –
– / –
1 day
5.5 K
18 hours
3 K
10 hours

IFERROR Syntax

=IFERROR(value, value_if_error)

Arguments

  • value: The expression, formula, or cell reference you want to check for errors.
  • Value_if_error: The result you want Excel to return if the value argument results in an error.

Summary of IFERROR Function in Excel

Function

IFERROR

Syntax

=IFERROR (value, value_if_error)

Function category

Logic

Description

Returns a value that you specify if a formula evaluates with an error; otherwise, it returns the result of the formula.

Return value

The value you specify for error conditions.

Applies to

Excel 2016, Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007

Related functions

IF Function, AND Function, OR Function

If you want to boost your data analytical skills then start with learning MS Excel! We recommend you to select the most suitable MS Excel online courses as per your professional and personal goals. Learn how to use both basic and advanced Excel formulas and functions, dashboards, macros, pivot tables, and data analysis tools to improve business insights and reporting.

Examples: IFERROR Function in Excel 

Listed are some examples of IFERROR Function in Excel to understand how to use this function:

Example 1: Replace Errors with a Blank Cell or Custom Text

Scenario: You are calculating price per unit using the formula Sale ÷ Unit. But when the Unit is 0 or empty, Excel shows an error. Let's see how to do it - 

Step 1: Go to the cell where you want the result.

Step 2: Enter the formula:

=IFERROR(B2/C2, "")

This shows a blank cell if there’s an error (like dividing by 0).

If you prefer to show a message instead of a blank, enter:

=IFERROR(B2/C2, "Error")

This shows the word "Error" if something goes wrong.

Example 2: Use IFERROR with VLOOKUP to Show “Not Found”

Scenario: You use VLOOKUP to find values in a table. But if a match isn’t found, Excel shows #N/A.

Step 1: Select the cell where you want to perform the lookup.

Step 2: Enter this formula:

=IFERROR(VLOOKUP(D2, $A$2:$B$11, 2, FALSE), "Not Found")

This shows "Not Found" when the item doesn’t exist in the list.

Example 3: Use Nested IFERROR with VLOOKUP to Check Multiple Tables

Scenario: You have two different tables. You want Excel to search in the first one, and if the item isn’t found, try the second one.

Step 1:  Click on the target cell.

Step 2: Enter this formula:

=IFERROR(VLOOKUP(G2, $A$2:$B$7, 2, FALSE), IFERROR(VLOOKUP(G2, $D$2:$E$7, 2, FALSE), "Not Found"))

Excel first looks in the first table. If not found, it will look in the second table.

If still not found, it shows "Not Found".

Key Observations

  • You can use the IFERROR function to detect and handle errors in an expression.
  • If the value of value_if_error is an empty cell, IFERROR treats it as an empty string value ("").
  • The IFERROR function is based on the IF function and uses the same error messages, but has fewer arguments. The relationship between the IFERROR function and the IF function is as follows:
  • IFERROR(A,B) := IF(ISERROR(A), B, A)

IFERROR checks if expression A results in an error using ISERROR; if it does, it returns B (the specified alternative value); otherwise, it returns A (the original result). This equivalence is how IFERROR simplifies error handling compared to nesting IF and ISERROR functions.

  • This feature is not supported in DirectQuery mode when used in computed columns or row-level security (RLS) rules.

Related Reads

Difference Between VLOOKUP and HLOOKUP
Difference Between VLOOKUP and HLOOKUP
In MS Excel, knowing the difference between VLOOKUP and HLOOKUP is essential because they work differently. VLOOKUP searches for data vertically, while HLOOKUP searches horizontally, based on how your data...read more

How to Use the Formula Bar in Excel?
How to Use the Formula Bar in Excel?
One of the great advantages of Microsoft Excel is its comprehensive set of tools, enabling quick and easy task execution. Excel allows users to perform various mathematical calculations using various...read more

How to Compare Two Columns in Excel? (5 Easy Methods)
How to Compare Two Columns in Excel? (5 Easy Methods)
Excel spreadsheets are useful for data storage, manipulation, and decision-making. Since such spreadsheets are huge and often multiple spreadsheets are linked to one another. Knowing certain functions that facilitate...read more

How to Calculate Age in Excel (With Multiple Examples)
How to Calculate Age in Excel (With Multiple Examples)
Calculating age in MS Excel is a very simple task, thanks to the software's robust functions and formulas. Whether you are managing employee records in human resources, conducting demographic analysis,...read more

How to Find Duplicates in Excel?
How to Find Duplicates in Excel?
Learn how to find duplicates in Excel using the COUNTIF function and the Conditional Formatting feature. This quick and easy guide will show you how to identify and remove duplicate...read more

How to Calculate the Difference Between Two Dates in Excel?
How to Calculate the Difference Between Two Dates in Excel?
Whether you need to determine the number of days between two events, measure the duration of a project, or calculate an individual’s age, Excel offers a range of functions and...read more
About the Author
author-image
Rashmi Karan
Manager - Content

Name: Rashmi Karan

Education: M.Sc. Biotechnology

Expertise: IT & Software Entrance Exams

Rashmi Karan is a Postgraduate in Biotechnology with over 15 years of experience in content writing and editing. She speciali

Read Full Bio