articles

Home / DeveloperSection / Articles / IFERROR function in Excel

IFERROR function in Excel

AVADHESH PATEL5263 26-Mar-2013

In Excel sheet, if we want to display custom error when we apply formula into cells. IFERROR function returns a value you specify if a formula evaluates to an error; otherwise, returns the result of the formula. Use the IFERROR function to trap and handle errors in a formula.

Syntax:

IFERROR(value,value_if_error)

Note:

·         Value     is the argument that is checked for an error. 

·         Value_if_error     is the value to return if the formula evaluates to an error. The following error types are evaluated: #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL!. 

·         If value or value_if_error is an empty cell, IFERROR treats it as an empty string value (""). 

·         If value is an array formula, IFERROR returns an array of results for each cell in the range specified in value. See the second example below. 

Example:

IFERROR function in Excel

From the above image, I’m going to calculate per unit cost, if value is calculated successfully then it return value otherwise it return error message. See below example.

=IFERROR(B3/C3,”Error in calculation”)

IFERROR function in Excel

Note:

When we apply formula on row 3-9 for calculating per unit cost,  all return value but row 8 return custom error message because value not divided by 0 (zero).



Updated 07-Sep-2019
Avadhesh Kumar Patel District Project Manager - Aligarh 14 months work experience in Panchayati Raj Department Sector as District Project Manager & 12 months work experience in IT Sector as Software Engineer. :-)

Leave Comment

Comments

Liked By