Purpose
Return value
Syntax
=ISERROR(value)
- value - The value to check for any error.
Using the ISERROR function
The ISERROR function returns TRUE for any type of error, including #N/A , #VALUE! , #REF! , #DIV/0! , #NUM! , #NAME? , #NULL! , #CALC! , and #SPILL! errors. You can use ISERROR together with the IF function to test for errors and display a custom message, or run a different calculation when an error occurs. The ISERROR function takes one argument, value , which is typically a cell reference.
Examples
ISERROR will return TRUE if A1 contains an error:
=ISERROR(A1) // TRUE if A1 contains an error
You can use the ISERROR function together with the IF function to test for an error and display a custom message if found:
=IF(ISERROR(A1),"custom message")
To trap an error and perform a different calculation, the IFERROR function is a cleaner approach.
Other error functions
Excel provides a number of error-related functions, each with a different behavior:
- The ISERR function returns TRUE for any error type except the #N/A error.
- The ISERROR function returns TRUE for any error.
- The ISNA function returns TRUE for #N/A errors only.
- The ERROR.TYPE function returns the numeric code for a given error.
- The IFERROR function traps errors and provides an alternative result.
- The IFNA function traps #N/A errors and provides an alternative result.
Purpose
Return value
Syntax
=ISEVEN(value)
- value - The numeric value to check.
Using the ISEVEN function
The ISEVEN function tests for even numbers. ISEVEN takes one argument , value , which should be a numeric value or a cell reference. When value is an even number, ISEVEN returns TRUE. When value is an odd number, ISEVEN returns FALSE. If value is not numeric, ISEVEN will return the #VALUE error. Only the integer portion of value is evaluated, decimal values are truncated.
Examples
The ISEVEN function returns TRUE or FALSE:
=ISEVEN(4) // returns TRUE
=ISEVEN(3) // returns FALSE
=ISEVEN(0) // returns TRUE
If cell A1 contains 11, the formula below returns FALSE:
=ISEVEN(A1) //returns FALSE
Only the integer portion of value is tested. If value is a decimal number, the decimal portion is truncated:
=ISEVEN(4.1) // returns TRUE
=ISEVEN(0.33) // returns TRUE
=ISEVEN(7.4) // returns FALSE
Notes
- If value is not numeric, ISEVEN will return the #VALUE error.
- Only the integer portion of value is tested, decimal values are truncated.
- Use the ISODD function to test for odd numbers.