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.
Purpose
Return value
Syntax
=ISFORMULA(reference)
- reference - Reference to cell or cell range.
Using the ISFORMULA function
The ISFORMULA function returns TRUE if a cell contains a formula, and FALSE if not. When a cell contains a formula ISFORMULA will return TRUE regardless of the formula’s output or error conditions. The ISFORMULA takes one argument , reference , which must be a cell reference.
Examples
If cell A1 contains the formula =2+2, the ISFORMULA function returns TRUE:
=ISFORMULA(A1) // returns TRUE
If cell A1 contains the text “apple”, the ISFORMULA function returns FALSE:
=ISFORMULA(A1) // returns FALSE
Count formulas
To count cells in a range that contain formulas, you can use the SUMPRODUCT function like this:
=SUMPRODUCT(--ISFORMULA(range))
The double negative coerces the TRUE and FALSE results from ISFORMULA into 1s and 0s and SUMPRODUCT returns the sum.
Notes
- You can temporarily display all formulas in a worksheet with a keyboard shortcut .
- To extract and display a formula as text, use the FORMULATEXT function .