Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Excel ISERROR Formula Guide

· 7 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

The Excel ISERROR function is a logical test that returns TRUE if a cell contains any type of error value (like #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL!) and FALSE if the cell contains valid data or text. To use it, simply type =ISERROR(cell_reference) into a new cell, replacing "cell_reference" with the actual cell you want to check. This is most commonly used in conjunction with the IF function to handle errors gracefully, such as by displaying a custom message or performing a calculation only when the data is valid.

What You'll Need

  • Microsoft Excel installed on your computer (Desktop, Web, or Mobile versions support this function).
  • A dataset containing potential errors or calculations that might result in errors.
  • A basic understanding of Excel formulas and cell references (absolute and relative).

Step-by-Step

  1. Identify the Cell or Range: Determine which cell contains the data, formula, or calculation that you suspect might produce an error. This is your target cell. For example, if you have a division formula in cell B2 that divides 10 by 0, Excel will return the #DIV/0! error.
  2. Open a New Cell: Click on the cell where you want the result of the ISERROR function to appear. This cell will display either TRUE or FALSE. For a more readable output, you will typically nest this inside an IF function.
  3. Enter the ISERROR Function: Type the equals sign (=) and start typing "ISERROR". Excel will suggest the function name; press Enter or click on it to select it. The function syntax will appear: =ISERROR(value).
  4. Provide the Value Argument: Select the target cell from step 1. For our example, you would type =ISERROR(B2). This tells Excel to check cell B2 for any error.
  5. Verify the Result: Press Enter. If cell B2 contains a formula that results in an error, the new cell will display TRUE. If B2 is a valid number or text, it will display FALSE.
  6. Nest for Conditional Logic (The IF Function): To actually *do* something when an error is found, wrap the ISERROR function in an IF statement. Type =IF(ISERROR(B2), "Error Found", B2). This formula says: "If B2 is an error, show the text 'Error Found'; otherwise, show the value in B2."
  7. Copy the Formula Down: If you have a column of data (e.g., B2 through B100) that you want to check, click on the cell containing your formula, hover your mouse over the bottom-right corner of the cell until you see a small black cross (the fill handle), and drag it down to the bottom of your data range.
  8. Review the Output: Scroll through your data. Cells with errors will now show your custom message, while cells with valid data will show their original values, making your spreadsheet much easier to read and troubleshoot.

Common Mistakes

Using ISERROR Instead OF ISERR: This is the most common error. The ISERROR function checks for *any* error, including #N/A. However, many lookup functions like VLOOKUP or MATCH use #N/A when a value is not found. If you use ISERROR to hide #N/A errors, you might accidentally hide a critical data lookup failure. Use the ISERR function (which checks for all errors except #N/A) if you want to catch calculation errors but allow lookup failures to remain visible, or use ISNA specifically for #N/A.

Forgetting the Equals Sign: Always start a formula with an equals sign (=). Without it, Excel will treat the text as data rather than a formula, resulting in a #VALUE! error or simply displaying the text you typed.

Incorrect Parentheses: Excel is very sensitive to parentheses. If you miss one, or type an extra one, the formula will return a syntax error. Always ensure the opening parentheses matches the closing one for every function you use.

Hardcoding the Cell Reference: When copying formulas down a column, it is tempting to type the cell reference manually for every row. Instead, use relative references (e.g., B2) so that when you copy the formula, the reference adjusts automatically to B3, B4, and so on.

Tips

Combine WITH IFERROR: For the most common scenario of hiding errors, Excel offers a built-in shortcut called IFERROR. The formula =IFERROR(B2/B1, 0) works exactly like =IF(ISERROR(B2/B1), 0, B2/B1) but is shorter and easier to read. However, IFERROR hides *all* errors, so use ISERROR if you need to differentiate between a #DIV/0! error and a #N/A error.

Use ISERROR WITH VLOOKUP: A frequent use case is checking if a VLOOKUP found a match. If you use =VLOOKUP(A2, Table, 2, FALSE) and the value isn't found, it returns #N/A. You can use ISERROR to check this: =IF(ISERROR(VLOOKUP(A2, Table, 2, FALSE)), "Not Found", VLOOKUP(A2, Table, 2, FALSE)). This prevents your report from being cluttered with #N/A errors.

Error Checking Toolbar: If you have a spreadsheet with many errors, you can use the Error Checking toolbar. Go to the Formulas tab on the ribbon and look for the "Error Checking" button. This allows you to step through errors one by one and choose how you want to handle them (e.g., ignore, trace error, or edit).

Conditional Formatting: You can use ISERROR to highlight errors. Select the range of cells, go to Home > Conditional Formatting > New Rule. Choose "Use a formula to determine which cells to format" and enter the formula =ISERROR(A1). Then, choose a formatting style (like red text) to apply. This provides a visual cue of where errors exist without changing the data.

Troubleshooting

Result is Always FALSE: If your ISERROR formula is returning FALSE even though the cell looks like it contains an error, check the cell itself. Sometimes, a cell might contain a string of text that looks like an error (e.g., "#DIV/0!"). ISERROR only detects *actual* errors produced by formulas. You may need to use the SEARCH or ISNUMBER function to check if a cell contains the text "#DIV/0!".

#VALUE! Error in the Formula: If you are trying to use ISERROR on a range of cells (e.g., =ISERROR(A1:B10)), Excel will return a #VALUE! error. ISERROR is designed to work on a single cell reference. To check a range, you must use the IFERROR function with an array formula or use the SUMPRODUCT function combined with ISERROR, or check each cell individually.

Formula Not Updating: If you change the data in the source cell but the ISERROR result doesn't update, ensure that "Automatic Calculation" is enabled. Go to the Formulas tab and check the "Calculation Options" dropdown. Ensure it is set to "Automatic". If it is set to "Manual", you will need to press F9 to recalculate the workbook.

Hidden Characters: Sometimes, errors are caused by invisible characters copied from the web. If a cell looks like it has a number but ISERROR returns FALSE, try pasting the value into Notepad and copying it back. This often strips out hidden characters that cause formula errors.

Frequently Asked Questions

What is the difference between ISERROR and ISERR?

ISERROR returns TRUE for any error value, including #N/A. ISERR returns TRUE for all errors except #N/A. If you are checking a VLOOKUP for a match, use ISERROR to catch the #N/A, or use ISNA specifically for #N/A. If you are checking a division or calculation, ISERR is usually sufficient.

Can I use ISERROR with the IF function?

Yes, this is the most common use case. You use it to create conditional logic. For example, =IF(ISERROR(A1/B1), "Cannot divide by zero", A1/B1) will display a friendly message instead of an error code if the formula fails.

Why does my ISERROR formula return FALSE for a cell that shows #REF!?

This is rare but can happen if the cell is formatted incorrectly. Double-check that the cell is actually a formula (look at the formula bar). If the cell simply contains the text "#REF!", ISERROR will return FALSE because it is text, not an actual error value. You can use the ISTEXT function to check for this.

Does ISERROR work on dates?

No, ISERROR does not typically work on date objects in a way that detects formatting issues. If a date cell is formatted incorrectly, it will usually display as a number or a series of hash marks (#). However, if a date formula results in an error (like a date outside the valid range), ISERROR will return TRUE.

How do I hide all errors in a column at once?

The easiest way is to use the IFERROR function. Select the column of formulas, press Ctrl+C to copy, then right-click the first cell in the column, select "Paste Values", and then right-click again and select "Paste Special > Values > Formulas". Replace the original formulas with =IFERROR(original_formula, ""). This is a common trick to clean up data for reporting.

What is the ISNA function?

ISNA is a specific variation that checks only for the #N/A error. It is useful when you want to catch lookup failures but ignore other calculation errors. For instance, you might want to highlight cells where a VLOOKUP failed but not cells where a division by zero occurred.