×

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

Solver in Excel

What is Solver? Microsoft Excel facilitates an add-in programming tool known as Solver that uses operational research techniques to find the optimal solutions for objective problems. This tool operates with a group of...

5 minutes read.

Histogram in Excel

What is Histogram in Excel? “ A histogram is a graphical tool familiar for summarizing discrete or continuous data, where the data are measured on an interval scale.”  Karl Pearson described this...

5 minutes read.

Excel WORKDAY() Function

Excel WORKDAY() Function The WORKDAY() function in excel returns the serial number of the date before or after a specified number of workdays. Syntax WORKDAY (START_DAY, DAYS, [HOLIDAYS]) Parameter START_DAY (required)- This parameter represents the...

1 minute read.

Paste Options in Excel

Excel spreadsheet is a combination of numeric values, alphabets which is used for calculation purposes. While performing the calculations, there is a need to repeat the data for further process....

6 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.

Excel Unique Values

The Unique function in Excel filters the list of unique values from the given data like range or array. The data presented is either number, text, date, time etc. This...

3 minutes read.

Excel DAYS() Function

The DAYS() function in excel returns the number of days that exist between two dates. Syntax DAYS (end_date, start_date) Parameter end_date (required)- This parameter represents the end date. start_date (required)- This parameter represents the start date. Category Date...

1 minute read.

What if Analysis Data Table in Excel

What is What-If Analysis? Suppose you have a cell A15 which is formula driven i.e. has a formula and the formula is based on values in different cells (A1, A2, A3, A4), what-if...

4 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.

Multiplication in Excel

Multiplication plays a vital role in Mathematics. Usually, the calculations are performed manually and automatically. Manual calculations take time and sometimes leads to error, and it is a challenging process...

5 minutes read.

Excel EXACT() Function

The EXACT() function in excel checks whether the specified values (texts, numbers) are exactly the same or not. It returns a Boolean value TRUE if the compared values are same, else it...

1 minute 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.

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.

Charts in Excel

Charts Definition of Charts A chart is used to show numbers or data in a spreadsheet visually. It is the visual representation of your data. It is a tool that can be used in...

3 minutes read.

Go-To Special function in Excel

Go-to Special The Go-To Special function in Excel allows you to select all cells that meet certain criteria quickly. This command is used to identify specific cells – the ones which...

1 minute read.

Date and Time in Excel-VBA

In this modern world of computer technology the creation of Excel reports are termed to be the crucial elements, and the particular type of programs that helps us in performing...

6 minutes read.

Quarter Dates in Excel

Excel is a combination of numeric values and alphabets. The user's project consists of the date depending upon their accounting and financial analysis. Sometimes there is a need to find...

4 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.

Purpose of Randomize in Excel

Excel spreadsheets are used on a large scale for business and personal usage. It is used to store data, perform multiple calculations, make assumptions based on charts and graphs etc....

7 minutes read.

Text to columns in Excel

Microsoft Excel is widely used in startups to large companies. The data are entered in required rows and columns, and sometimes the data entered in one cell needs to enter...

4 minutes read.