How to Use ISERROR in Google Sheets (With Examples)


The ISERROR function in Google Sheets can be used to check whether a value in a specific cell is an error.

This function uses the following basic syntax:

=ISERROR(A1)

This function returns TRUE if the value in cell A1 is an error, otherwise it returns FALSE.

The following examples show to use this function in two different scenarios in Google Sheets.

Example 1: Use ISERROR to Return New Value

Suppose we attempt to divide the values in column A by the values in column B in the following Google Sheets spreadsheet:

When dividing by zero, we get #DIV/0! as a result in column C.

We could use the following formula to instead return a value of “Invalid Division” as a result:

=IF(ISERROR(A2/B2), "Invalid Division", A2/B2)

The following screenshot shows how to use this formula in practice:

If the function ISERROR(A2/B2) is TRUE, then “Invalid Division” is returned.

Otherwise, if the function ISERROR(A2/B2) is FALSE, then the result of A2/B2 is returned.

Example 2: Use ISERROR with VLOOKUP

Suppose we attempt to perform a VLOOKUP in the following spreadsheet to find the value in the Points column that corresponds to a name of “Mag” in the Team column:

Since the name “Mag” does not exist in the Team column, we receive #N/A as a result.

We could instead use the following formula to return a value of “Team Does Not Exist” if the VLOOKUP formula is unable to find the team name:

=IF(ISERROR(VLOOKUP("Mag", A1:B11, 2, FALSE)), "Team Does Not Exist", VLOOKUP("Mag", A1:B11, 2, FALSE)) 

The following screenshot shows how to use this formula in practice:

Since the name “Mag” does not exist in the Team column, the formula returns “Team Does Not Exist” as a result instead of #N/A.

Note: You can find the complete online documentation for the ISERROR function here.

Additional Resources

The following tutorials explain how to perform other common tasks in Google Sheets:

How to Replace Text in Google Sheets
How to Replace Blank Cells with Zero in Google Sheets
How to Use a Case Sensitive VLOOKUP in Google Sheets

Leave a Reply

Your email address will not be published.