search
HomeTopicsexcelISERROR function in Excel with formula examples

This tutorial explores the practical applications of Excel's ISERROR function, demonstrating how to identify and manage errors within formulas. When a formula is invalid or uncalculatable, Excel displays an error message. The ISERROR function helps detect these errors and offers alternative solutions.

  • ISERROR Function
  • ISERROR Formula
  • IF ISERROR
  • IF ISERROR with VLOOKUP
  • IF ISERROR with INDEX MATCH
  • IF ISERROR Yes/No Formula
  • Counting Errors
  • ISERROR vs. IFERROR

The ISERROR Function

Excel's ISERROR function identifies various error types, including #CALC!, #DIV/0!, #N/A, #NAME?, #NUM!, #NULL!, #REF!, #VALUE!, and #SPILL!. It returns a Boolean value: TRUE for an error, FALSE otherwise. This function is compatible with Excel 2000 through 2021 and Excel 365.

The syntax is straightforward:

ISERROR(value) where value represents the cell or formula to be checked.

Using the ISERROR Formula

A basic ISERROR formula checks a cell for errors:

=ISERROR(A2)

This returns TRUE if an error exists in cell A2, and FALSE otherwise.

ISERROR function in Excel with formula examples

The IF ISERROR Formula

Combine ISERROR with the IF function to customize error handling. The general formula is:

IF(ISERROR(formula(...)), text_or_calculation_if_error, formula())

This means: if the main formula produces an error, display the specified text or perform a different calculation; otherwise, return the formula's normal result.

The image below shows a Price column with errors resulting from division:

ISERROR function in Excel with formula examples

To replace error codes with custom text, use:

=IF(ISERROR(A2/B2), "Unknown", A2/B2)

ISERROR function in Excel with formula examples

Excel 2007 and later offer the IFERROR function for a similar outcome:

=IFERROR(A2/B2, "Unknown")

IFERROR is slightly faster as it calculates A2/B2 only once, unlike IF ISERROR which calculates it twice.

IF ISERROR with VLOOKUP

Using ISERROR with VLOOKUP is a specific application of the IF ISERROR formula. When VLOOKUP fails (e.g., lookup value not found), display custom text using:

IF(ISERROR(VLOOKUP(...)), "custom_text", VLOOKUP(...))

This example retrieves times from a lookup table (D3:E10) to the main table (A3:B15). If a participant's name is not found, "Not qualified" is returned:

=IF(ISERROR(VLOOKUP(A3, $D$3:$E$10, 2, FALSE)), "Not qualified", VLOOKUP(A3, $D$3:$E$10, 2, FALSE))

ISERROR function in Excel with formula examples

Note: For handling only #N/A errors (lookup value not found), use IFNA (Excel 2013 ) or IF ISNA (older versions).

IF ISERROR with INDEX MATCH

The same error-handling technique applies to INDEX MATCH lookups. ISERROR checks for errors, and IF displays specified text if an error occurs:

IF(ISERROR(INDEX(return_column, MATCH(lookup_value, lookup_column, 0))), "custom_text", INDEX(return_column, MATCH(lookup_value, lookup_column, 0)))

This example uses INDEX MATCH to retrieve times from column D:

=IF(ISERROR(INDEX($D$3:$D$10, MATCH(A3, $E$3:$E$10, 0))), "Not qualified", INDEX($D$3:$D$10, MATCH(A3, $E$3:$E$10, 0)))

ISERROR function in Excel with formula examples

Again, consider using IFNA or IF ISNA for handling only #N/A errors.

IF ISERROR Yes/No Formula

This example returns different text based on the presence or absence of an error:

IF(ISERROR(formula(...)), "text_if_error", "text_if_no_error")

This formula checks if a participant's name is in the qualified list (column D) and returns "Yes" or "No":

=IF(ISERROR(MATCH(A3, $D$3:$D$10, 0)), "No", "Yes")

ISERROR function in Excel with formula examples

Counting Errors

To count errors in a column, use ISERROR on a range, convert Boolean values to 1s and 0s using the double unary operator (--), and sum the results using SUM or SUMPRODUCT:

=SUM(--ISERROR(C2:C10)) (Excel 365 and 2021)

{=SUM(--ISERROR(C2:C10))} (Array formula for Excel 2019 and earlier)

=SUMPRODUCT(--ISERROR(C2:C10)) (Works in all versions)

ISERROR function in Excel with formula examples

ISERROR vs. IFERROR

Both functions handle errors, but ISERROR only tests for errors, while IFERROR suppresses them and returns a specified value. IFERROR is available from Excel 2007 onwards. IF ISERROR offers more flexibility for handling both error and non-error scenarios.

Downloadable examples: ISERROR formula examples (.xlsx file)

The above is the detailed content of ISERROR function in Excel with formula examples. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
MEDIAN formula in Excel - practical examplesMEDIAN formula in Excel - practical examplesApr 11, 2025 pm 12:08 PM

This tutorial explains how to calculate the median of numerical data in Excel using the MEDIAN function. The median, a key measure of central tendency, identifies the middle value in a dataset, offering a more robust representation of central tenden

Google Spreadsheet COUNTIF function with formula examplesGoogle Spreadsheet COUNTIF function with formula examplesApr 11, 2025 pm 12:03 PM

Master Google Sheets COUNTIF: A Comprehensive Guide This guide explores the versatile COUNTIF function in Google Sheets, demonstrating its applications beyond simple cell counting. We'll cover various scenarios, from exact and partial matches to han

Excel shared workbook: How to share Excel file for multiple usersExcel shared workbook: How to share Excel file for multiple usersApr 11, 2025 am 11:58 AM

This tutorial provides a comprehensive guide to sharing Excel workbooks, covering various methods, access control, and conflict resolution. Modern Excel versions (2010, 2013, 2016, and later) simplify collaborative editing, eliminating the need to m

How to convert Excel to JPG - save .xls or .xlsx as image fileHow to convert Excel to JPG - save .xls or .xlsx as image fileApr 11, 2025 am 11:31 AM

This tutorial explores various methods for converting .xls files to .jpg images, encompassing both built-in Windows tools and free online converters. Need to create a presentation, share spreadsheet data securely, or design a document? Converting yo

Excel names and named ranges: how to define and use in formulasExcel names and named ranges: how to define and use in formulasApr 11, 2025 am 11:13 AM

This tutorial clarifies the function of Excel names and demonstrates how to define names for cells, ranges, constants, or formulas. It also covers editing, filtering, and deleting defined names. Excel names, while incredibly useful, are often overlo

Standard deviation Excel: functions and formula examplesStandard deviation Excel: functions and formula examplesApr 11, 2025 am 11:01 AM

This tutorial clarifies the distinction between standard deviation and standard error of the mean, guiding you on the optimal Excel functions for standard deviation calculations. In descriptive statistics, the mean and standard deviation are intrinsi

Square root in Excel: SQRT function and other waysSquare root in Excel: SQRT function and other waysApr 11, 2025 am 10:34 AM

This Excel tutorial demonstrates how to calculate square roots and nth roots. Finding the square root is a common mathematical operation, and Excel offers several methods. Methods for Calculating Square Roots in Excel: Using the SQRT Function: The

Google Sheets basics: Learn how to work with Google SpreadsheetsGoogle Sheets basics: Learn how to work with Google SpreadsheetsApr 11, 2025 am 10:23 AM

Unlock the Power of Google Sheets: A Beginner's Guide This tutorial introduces the fundamentals of Google Sheets, a powerful and versatile alternative to MS Excel. Learn how to effortlessly manage spreadsheets, leverage key features, and collaborate

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!