ISERROR()

Syntax. ISERROR(value)

Definition. This function returns the logical value TRUE if the value is an error value. Otherwise, the function returns FALSE.

Unlike the ISERR() function, this function returns TRUE for the #N/A error value.

Arguments

  • value (required). The expression (a number, text, a formula without an equal sign, a logical value, an error value, a reference, or a name) that you want to check.

Background. This function is one of the nine IS() functions that return a logical value depending on the argument. The argument of the IS() functions is not converted for evaluation. This means that a string consisting of a number is interpreted as a string (not as a number). IS() functions are often used together with the IF() function to pre-test the result of a calculation. The result returned by an IS() function can be used as the basis for conditional formats and validation rules.

The examples for the ERROR.TYPE() function show how to locate errors in formulas.

Example. Assume that you have created a list with birthdays (or order numbers, address information, or phone numbers) and want to access this information by using the VLOOKUP() function. Figure 11-5 shows an example.

Error explanation for list searches.

Figure 11-5. Error explanation for list searches.

If you enter the formula

=VLOOKUP(B36,D36:E38,2,FALSE)

in cell B37, you get the #N/A error, which is especially annoying when you are printing the worksheet. In other situations, you might want to use interim values and ignore errors.

In this case, you can use the IF() function in B38 instead of the simpler formula in B37:

=IF(ISERROR(VLOOKUP(B36,D36:E38,2,FALSE)),"not found"; VLOOKUP(B36,D36:E38,2,FALSE))

See Also

ERROR.TYPE(), ISBLANK(), ISERR(), ISLOGICAL(), ISNA(), ISNONTEXT(), ISNUMBER(), ISREF(), ISTEXT()

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.128.200.220