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
How to create timeline in Excel to filter pivot tables and chartsHow to create timeline in Excel to filter pivot tables and chartsMar 22, 2025 am 11:20 AM

This article will guide you through the process of creating a timeline for Excel pivot tables and charts and demonstrate how you can use it to interact with your data in a dynamic and engaging way. You've got your data organized in a pivo

Can excel import xml filesCan excel import xml filesMar 07, 2025 pm 02:43 PM

Excel can import XML data using its built-in "From XML Data Import" function. Import success depends heavily on XML structure; well-structured files import easily, while complex ones may require manual mapping. Best practices include XML

how to do a drop down in excelhow to do a drop down in excelMar 12, 2025 am 11:53 AM

This article explains how to create drop-down lists in Excel using data validation, including single and dependent lists. It details the process, offers solutions for common scenarios, and discusses limitations such as data entry restrictions and pe

how to sum a column in excelhow to sum a column in excelMar 14, 2025 pm 02:42 PM

The article discusses methods to sum columns in Excel using the SUM function, AutoSum feature, and how to sum specific cells.

how to make pie chart in excelhow to make pie chart in excelMar 14, 2025 pm 03:32 PM

The article details steps to create and customize pie charts in Excel, focusing on data preparation, chart insertion, and personalization options for enhanced visual analysis.

how to calculate mean in excelhow to calculate mean in excelMar 14, 2025 pm 03:33 PM

Article discusses calculating mean in Excel using AVERAGE function. Main issue is how to efficiently use this function for different data sets.(158 characters)

how to make a table in excelhow to make a table in excelMar 14, 2025 pm 02:53 PM

Article discusses creating, formatting, and customizing tables in Excel, and using functions like SUM, AVERAGE, and PivotTables for data analysis.

how to add drop down in excelhow to add drop down in excelMar 14, 2025 pm 02:51 PM

Article discusses creating, editing, and removing drop-down lists in Excel using data validation. Main issue: how to manage drop-down lists effectively.

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

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),