# IFERROR Function

Returns the first value if it isn’t an error and otherwise returns the second value
Sample usage
Syntax
IFERROR(
• value
• value_if_error
)
• value
The value, typically a formula, to test for an error
• value_if_error
The value or formula to return if the first value results in an error
Usage notes

• This is similar to nesting the ISERROR function within an IF function; however, with IFERROR you don't have to retype or re-evaluate the expression.
• This function does not suppress errors caused by improperly constructed formulas. For example, #UNPARSEABLE, #CIRCULAR REFERENCE, #BLOCKED, #DATE EXPECTED, #CONTACT EXPECTED.

Examples

This example references the following sheet information:

Row #Clothing ItemItem NumberPrice Per UnitShip Date
1T-ShirtC001\$15.0003/05/19
2PantsC002\$35.5003/20/19
3JacketC003\$200.0002/27/19
4JacketC003#DIVIDE BY ZERO02/27/19

Given the table above, here are some examples of using IFERROR in a sheet:

=IFERROR(SUM([Price Per Unit]:[Price Per Unit]), "There is an Error in Price")Sums the Price Per Unit column. If there is an error, the formula produces the value There is an Error in Price There is an Error in Price
=COUNTIF([Ship Date]:[Ship Date], IFERROR(MONTH(@cell) = 3, " "))

Counts the values in the Ship Date column, if the month’s cell value equals 3 (March). If there is an error in the criteria, the formula produces a blank value.

Rows 2 and 3 of the Ship Date column meet the criteria.

2
=IFERROR(VLOOKUP("Jacket", [Clothing Item]:[Item Number], 2, false), " ")Looks up the value Jacket in the Clothing Item column. If the formula finds the value, it produces the value in the Item Number column. If there is an error, such as a #No Match, the formula produces a blank value. C003

#### Still need help?

Use the Formula Handbook template to find more support resources and view 100+ formulas, including a glossary of every function that you can practice working with in real time, and examples of commonly used and advanced formulas.

Find examples of how other Smartsheet customers use this function or ask about your specific use case in the Smartsheet online Community.