Catalog

How to Use Iferror Function in Excel [Step-by-Step]

August 29, 2023 2.1K views

When working with division operations in Excel, encountering errors due to a divisor being 0 can be frustrating. Excel provides a powerful solution called the IFERROR function that allows you to easily handle such errors. This step-by-step guide will show you how to use the IFERROR function effectively and explore its versatility in dealing with various types of errors. You'll learn how to use IFERROR Function in Excel by following along with practical examples. Let's get started and explore the power of error handling with IFERROR.

IFERROR Function


What is the Iferror Function in excel?

The IFError function in excel is a built-in function that allows users to specify an error message to be displayed if there is an error in the input formula or calculations.

Let’s have a look at the syntax of IFError function:  IFERROR( value, value_if_error )

To make the most of the IFERROR function in excel, it's crucial to understand the arguments used in its syntax. These arguments serve as instructions for Excel, telling it what actions to take. Let's explore the two arguments in the IFERROR syntax:

Value: Formula or value that needs to be tested

Value_if_error: Value or expression you want to be displayed if the Value being tested is incorrect ((#N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME? or #NULL))

Simply put, while working with excel, there are chances of facing an error message; #DIV/0 if a user tries to divide a number with 0. In such cases, users can ask Excel to display a message instead of an error value like “Wrong Input”.

WPS Office: Use Word, Excel, and PPT for FREE, No Ads.

How to use the Iferror Function in Excel?

We know what an IFError function in excel is and its syntax, but how to use the IFError function in excel for our tasks? In this section, we will try to explain just that with a few IFError function examples.

Example

Let’s take a look at our shoe store where we use excel to keep a track of our sales. In our excel sheet, we have a column of numbers representing sales data. Some of the values have errors, such as #N/A or #DIV/0!. You want excel to display "No Sales" for any cells with errors instead of showing the error message.

Step 1: Open the excel sheet containing data.

Excel sales record


In our excel sheet, we encounters 2 errors; #VALUE and #DIV/0. #DIV/0 is a general Math error displayed when a number is being divided by 0.

We will be using the IFError function to avoid excel generated error messages and ask excel to display our unique response.

Step 2: In our Revenue column; D2, we will start typing in the IFError function, make sure to start with the “=”.

IFERROR Function


Step 3: For the “Value” argument, we will be multiplying cells C2 and B2 to get the sales of each product.

IFError Value argument


Step 4: For the “Value_if_error”, we will be entering our unique message “No Sales” and close the parentheses

IFError Value_if_error argument


Step 5: The results will be displayed with a unique error message.

IFError function in excel example


More Examples of IFERROR Function

While working in excel sheets with data, excel tries to communicate with the users using several different error messages, each having its unique meaning. However, for a novice Excel user, understanding and resolving these messages can be a hassle. In this section, we will learn more about these messages and also look at some examples.

  • #VALUE!: This error occurs when a formula contains invalid data types or operations that cannot be processed. It typically happens when you use inappropriate data types or perform calculations with incompatible values.

  • #REF!: This error indicates that a formula contains a reference to a cell or range that is no longer valid or has been deleted. It can occur when you delete cells or shift them around, causing the formula to refer to non-existent locations.

  • #DIV/0!: This error arises when you attempt to divide a value by zero. Division by zero is mathematically undefined, resulting in this error message.

  • #NUM!: This error occurs when a formula encounters an invalid numeric value or an operation that is not valid for numeric data. It can happen when you use functions with incorrect arguments or perform operations that produce unexpected results.

  • #NAME?: This error appears when Excel does not recognize a formula or function name. It can occur if you misspell a function name, use a non-existent function, or if the add-in containing the function is not enabled.

  • #NULL!: This error signifies that a formula contains an invalid intersection of two or more ranges. It can occur when you incorrectly specify the range reference in a formula or use an operator that expects a range intersection.

Value 1

Value 2

Error

2

2

No error

Hello

10

#VALUE!

10

0

#DIV/0!

A

3

#NAME?

20


#NULL!

Now that we know all the excel generated error messages, the question now is what errors can the IFERROR function fix? IFERROR functions with all error messages if used correctly. Let’s take a look at a few examples to understand better:

Example 1

Let’s look back at our above data set, our shoe store sales record is maintained by John. While entering the quantity sold, John accidentally entered “%” instead of “5”.

Excel #NAME? Error


The mistake ended up with excel giving the “#NAME?” error. To avoid this error, we will be using the IFERROR Function.

Step 1: In cell D2, enter the IFERROR Function, make sure to start the function with “=”.

IFERROR Function in excel


Step 2: Enter values for both the arguments. “C2*B2” for the “Value” argument and “0”  for the “Value_if_error” argument.

IFERROR Syntax


Step 3: In the results, “#NAME?” error message will be replaced with “0”

IFERROR Function example


Example 2

What if John accidentally deletes the “Price column” from our sheets? While calculating the “Revenue”, Excel won’t be able to locate the reference cell and return the “#REF!” error message.

#REF! Error message


Step 1: In cell C2, enter the IFERROR syntax and make sure to enter “0” in the “Value_if_error” argument.

IFERROR function for #REF! error


Example 3

When John was new to his job, he wasn't told what to enter in the “Quantity Sold” column in case there were no sales on a particular day. He decided to enter “nosales” instead, as a result excel displayed the “#VALUE!” error message

#VALUE! Error in excel


Step 1: Using IFERROR function, we can replace the “#VALUE!” error with “0), by simply entering “0” in the “Value_if_error” argument of the IFERROR syntax

IFError function for #VALUE error


Why Use WPS Office?

WPS Office is a compelling alternative to Excel for using the IFERROR function, offering similar capabilities, a user-friendly interface, and built-in PDF tools. While both Microsoft Excel and WPS Office Spreadsheet support the IFERROR function, choosing WPS Office provides several advantages:

  • Price: WPS Office is a free office suite with extensive features.

  • Compatibility: It supports various file formats, including those used in Microsoft Excel, such as XLSX, XLS, and CSV.

  • Features: It includes a comprehensive set of tools and functions, such as formulas, charts, data analysis, pivot tables, and conditional formatting.

  • User-friendly interface: WPS Office is designed to be intuitive and easy to navigate, making it accessible for users of all levels of expertise.

WPS Office


Features of WPS Office

  • Online PDF Tools: WPS Office provides powerful online PDF tools for creating, editing, converting, and securing PDF files, including merging documents, adding annotations, and password protection.

  • Free: WPS Office is a free office suite with various functionalities without a subscription, offering comprehensive benefits for individuals and businesses without financial burden.

  • All-in-One Office Suite: WPS Office is a comprehensive suite of tools for creating, editing, designing presentations, and performing complex calculations in a single software package.

  • Cloud Integration: WPS Office integrates with popular cloud storage services ensuring seamless file access and accessibility across multiple devices.

  • Compatibility: WPS Office seamlessly collaborates with Microsoft Office file formats, allowing seamless document sharing and opening, editing, and saving in DOCX, XLSX, and PPTX without compatibility issues.

FAQs about IfError function in excel

Q1. Does the IFERROR function work the same way in different language versions of Excel?

Yes, the IFERROR function is a built-in excel function and its functionality is not affected by language. However, the syntax is different in different language versions.

Q2. Are there any alternative methods for error handling in Excel formulas?

Yes, ISERROR, IFNA, IF and Nested functions can be used as an alternate method to handle error, however, it is not as efficient as IFERROR function.

Q3. Are there any limitations or special considerations when using IFERROR with large datasets?

When using IFERROR with large datasets in Excel, there are a few limitations and special considerations to keep in mind:

  • Calculation performance: Slow calculation performance due to individual cell evaluations and complex formulas.

  • Memory usage: Increases workbook memory usage, potentially causing slower performance or Excel unresponsiveness when working with large datasets.

  • Array formulas: May not function properly with array formulas due to memory-intensive nature, requiring testing and verification for specific scenarios.

To mitigate these problems users can simplify complex formulas, minimize volatile functions, and use efficient calculation settings.

Empower Your Excel Skills with IFERROR

IFERROR function is a powerful excel function, amongst others, that allows users to effectively deal with errors while working in excel sheets. By following along with practical examples, we learned how to effectively use the IFERROR function to tackle common errors. Not only did we learn about the IFERROR Function, we also discovered a powerful, cost-effective alternative to Microsoft Excel; WPS Office. With its intuitive interface and advanced functionalities, WPS Office provides users the capability of dealing with errors using the IFERROR function, but at a lower cost. There are no IFs when it comes to downloading WPS Office!


15 years of office industry experience, tech lover and copywriter. Follow me for product reviews, comparisons, and recommendations for new apps and software.