Excel IFError Function

This post will guide you how to use Excel IFERROR function with syntax and examples in Microsoft excel.


The Excel IFERROR function returns an alternate value you specify if a formula results in an error, or returns the result of the formula.

The IFERROR function is a build-in function in Microsoft Excel and it is categorized as a Logical Function.

The IFERROR function is available in Excel 2016, Excel 2013, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000, Excel 2011 for Mac.


The syntax of the IFERROR function is as below:

= IFERROR (value, value_if_error)

Where the IFERROR function arguments are:

  • Value -This is a required argument. The value or formula that you want to test
  • Value_if_error – This is a required argument.  The value that is returned if the formula evaluates to an error.  The below errors will check: #VALUE!, #N/A, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL!.


The below examples will show you how to use Excel IFERROR Function to return an alternate value if a formula evaluates to an error.

#1 =IFERROR(B2/B1,0)

excel iferror function example1

Note: the formula “B2/B1” will return an #DIV/0! Error,  if you use “IFERROR” function, the above excel formula will return an alternate value 0.

More IFERROR Function Examples

  • remove non numeric characters from a cell
    If you want to remove non numeric characters from a text cell in excel, you can use the array formula:{=TEXTJOIN(“”,TRUE,IFERROR(MID(B1,ROW(INDIRECT(“1:”&LEN(B1))),1)+0,””))}…
  • Get the List of File Names From a Folder
    You will learn that how to use Excel to view Files and Folders in your worksheet by get the list of file names with different ways, such as: Excel VBA Macro, or FILES function.…
  • Extract a List of Unique Values from a Column Range
    If you want to extract a list of unique items from a column or range, you can use a combination of the IFERROR function, the INDEX function, the MATCH function and the COUNTIF function to create an array formula.…
  • Extract multiple match Values into different Columns or Rows
    If you want to fetch all matches from a range then put it into cells in different columns, you can use a combination with the INDEX function, the SMALL function, the IF function,  the ROW function and the COLUMNS function to create a new excel formula..…
  • VLOOKUP Values from Multiple Worksheets
    you can use the VLOOKUP function to find the values from multiple worksheets in Excel. For example, assuming that you have two worksheets, and you want to search the data across those two worksheet in your current worksheet (sheet3)……
Related Posts

Trap Error or Replace Error by Specific Value with IFERROR function

We often use Excel formulas in our work life, and we may encounter this situation that the formula throws an error and finally an error like #DIV/0! Is displayed in the cell. In today’s tutorial, we will introduce you the ...

Find and Replace Multiple Values
find replace multiple values5

This post will guide you how to find and replace multiple values at once with VBA macro or using formula  in Excel. How do I make multiple find and replace in Excel. Suppose that you have a few cells containing ...

Excel XLOOKUP Function

Excel XLOOKUP Function was added into Excel as a beta feature in August 2019 and is now accessible exclusively in Microsoft 365. (as of July 2021). However, if you fall into this category and often deal with big sets of ...

Extract matching values From Two Lists
extract matching values from two list1

Suppose that you are working with two lists containing few values, and you want to extract the matching values from those two lists into another separate list. You might prefer to manually extract the matching values from the two lists, ...

Excel Filter Function (10 Examples)
excel filter function

This post will guide you how to extracts matched values using FILTER function in Microsoft Excel 365. And also will introduce that how to use FILTER function with same examples in Excel 365. Excel Filter Function The FILTER function "filters" ...

Extract Multiple Match Values into Separate Columns

If you have a few values/items in the excel sheet and you are thinking that with the aid of the “VlOOKUP” function you can look for a specific value, extract it and then put the matching item into the separate ...

VLOOKUP From Another Sheet Not Working
vlookup from another sheet not working3

In the previous post, you should know that how to fix or remove the #N/A error when using VLOOKUP formula to lookup value from another sheet. And this post will show you reasons why your VLOOKUP formula is not working ...

Fix #N/A Error For VLOOKUP From Another Sheet
vlookup from anther sheet not working1

This post will show you how to fix the #N/A error why it occurs when you extract values from another sheet using VLOOKUP function in Excel 2016,2013,2010 or other Excel versions. How can you correct a #N/A error in VLOOKUP ...

How to Count Duplicate Values Only Once in A Range in Excel?
How to Count Duplicate Values Only Once in A Range in Excel5

When counting the number of times for objects appear in a list or a range, we usually record the duplicate value only once and ignore the redundant ones. We cannot apply formula with only one function to implement this in ...

How to Dynamically Extract Unique Values from A Column List in Excel
Dynamically Extract Unique Values8

Suppose we have a list of some objects in one column, and some of them are duplicate, they also can be replaced by typing different object name, here’s the question, how can we dynamically extract unique values from this list ...