×

Excel IFERROR() Function

The IFERROR() function in excel returns the specified value if initially supplied the argument or formula returns an error, otherwise returns the result of the formula supplied in the first argument. When we use a formula in cells, we might get an error because of the cell value, IFERROR allows us to remove such errors with the values we want.

Syntax

IFERROR(Value,[Value_if_error])

Parameter

Value(required)- This parameter represents the first cell value, which is checked if there is an error.

Value_if_error (optional)- If in the cell there is an error, that error value will be replaced by this value.

Category

Logical

Return

The function returns the specified value if initially supplied the argument or formula returns an error, otherwise returns the result of the formula supplied in the first argument.

Example 1

Objective: Divide Col A by Col B and show the results without using IFERROR and with using IFERROR.

Col A Col B Without IFERROR &Formula With IFERROR &Formula
1 22 0.0454545  =A19/B19 0.045454545  =IFERROR(A19/B19,"NA")
121 0 #DIV/0!  =A20/B20 NA  =IFERROR(A20/B20,"NA")
0 0 #DIV/0!  =A20/B20 NA  =IFERROR(A21/B21,"NA")

NOTE: In the above function, on dividing 1 by 0, we get an error. Without using IFERROR, we get #DIV/0! i.e., an error, so using IFERROR, we can give values when we want. You can also enter a number or text, which can let the user know that there is some problem with the data.

Example 2

Objective: Divide COL A by COL B and return "Division Error", if it an produces error; return result otherwise.

Col A Col B Result Formula
0 269 Error =IFERROR(C151/B151,"Error")
89 85 0.95505618 =IFERROR(C152/B152,"Division Error")

Example 3

Objective: Divide Value 1 by Value 2 and show the results without using IFERROR and using the IFERROR function.

Value 1 Value 2 Without IFERROR &Formula With IFERROR &Formula
11 2 22  =A2*B2 22  =IFERROR(A2*B2,"DATA IS INVALID")
1 1 1  =A3*B3 1  =IFERROR(A3*B3,"DATA IS INVALID ")
13 o #VALUE!  =A3*B3 DATA IS INVALID  =IFERROR(A3*B3,"DATA IS INVALID")
25 n #VALUE!  =A4*B34 DATA IS INVALID  =IFERROR(A4*B4,"DATA IS INVALID")

Related Topics

Formats in Excel

What are the formats? Formats are different options that one uses to change the appearance of data (maybe text, number, etc..) in an excel file. They do not change the value of the...

3 minutes read.

Excel COUNT() Function

Excel COUNT() Function The COUNT() function counts the number of cells in a range that contain numbers. Syntax COUNT([value1], [value [2], ...) Parameter value1(required)- This parameter represents the first cell in the range. value2, …(optional)- It represents the...

1 minute read.

Square Root Function in Excel

The concept of Mathematical calculations includes a large number of numbers and calculations are based on the numbers present in the data. Likewise, Square Root is a function used to...

3 minutes read.

Reverse List in Excel

What is Reverse list in Excel? Microsoft Excel is widely used for calculation purposes like statistical and analytical for predicting and getting the result. Sometimes for calculation purposes, the user needs...

5 minutes read.

Shortcut Keys in Excel

Shortcut Keys in Excel Shortcut keys in Excel are used to simplify the work and save time by pressing a few keys.  These keys are used for navigating and working with Excel spreadsheets quickly and easily. Basic Selection:...

9 minutes read.

What do you understand by Combination Chart in Microsoft Excel?

In Microsoft Excel, an individual has the Combo Chart option available, which can be effectively clubbed into two charts types, which are Column Clusters Chart, Line Chart to get the...

7 minutes read.

Excel LEFT() Function

The LEFT () function in excel returns the leftmost characters from a text value. This function is used for data manipulation. Syntax LEFT(Text, [num_chars]) Parameter Text (required)- This parameter represents the string from which you want to...

1 minute read.

Conditional Formatting in Excel

Conditional Formatting What are the conditional formats? Conditional Formatting is a tool that allows the user to format cells or range of cells based on the selected condition or given criteria. The formatting will...

4 minutes read.

Excel Axes

What is Excel Axes? Axes are a horizontal or vertical line containing units of measure. There are two types of axes X and Y axes. X is a horizontal and Y...

3 minutes read.

Excel Function and Formulas

Excel Today() Function The today() function returns the serial number of today’s date as per system number of today’s date as per system’s regional settings. Syntax Today() Parameter NA Category Date & Time Returns This function returns today's date...

4 minutes read.

Excel EDATE() Function

Excel EDATE() Function The EDATE() function in excel returns the serial number of the date that is the indicated number of months before or after the start date. Syntax EDATE(Start_Date, Month) Parameter Start_Date(required)- This parameter represents...

1 minute read.

Spell Check in Excel

Spell Check in Excel Microsoft Excel facilities the complete features for examining the work with text. It provides the basic properties for the proper functioning of text, including the spell-check property. The...

5 minutes read.

Excel ROUNDUP() Function

Excel ROUNDUP() Function The ROUNDUP() function in excel returns a number rounded up to the nearest possible value and away from zero. Syntax ROUNDUP(Number, num_digits) Parameter Number(required)- This parameter represents the number which you want to...

1 minute read.

Adding Column in Excel

Excel spreadsheet is a combination of rows and columns. After creating the table, there is a need to insert additional row or columns. To organize a better worksheet for calculations,...

5 minutes read.

Excel Ribbon Toolbar

Excel Ribbon/Toolbar How does a toolbar look like? The top section of an excel file is called a Ribbon or a toolbar. It has various commands which can be useful for us in our daily work....

6 minutes read.

Row Difference in Excel

Microsoft Excel is used for multiple purposes in various organizations. It is a combination of numeric values, alphabets etc. To calculate data, the user organizes the data according to their...

5 minutes read.

Excel File using Password

How to Protect an Excel File using Password? Nowadays Microsoft Excel is widely used by large organizations to small organizations for their personal and professional usage. They share files to various...

2 minutes read.

How to print titles in Excel

In Microsoft Excel, if a particular task is completed in the worksheet, the user wants to print the worksheet. While performing this job, the row and column headings will display...

3 minutes read.

Trendline in Excel

A Trendline is a line imposed on a graph to predict the direction of the data. It connects the series of data together to showcase the data best fit. The...

3 minutes read.

Excel Themes

Microsoft Excel contains various features to enhance the appearance of the worksheet like text color, font size and general outlook of the objects. The users are provided with multiple theme...

3 minutes read.