ISEVEN function
The ISEVEN function in Excel is used to determine if a number is even. It returns TRUE if the number is even, and FALSE if the number is odd.
Syntax:
ISEVEN(number)
Arguments:
- number: The value you want to check. This can be a number, a reference to a cell containing a number, or an expression that results in a number.
Example:
Example 1: Even number
- Data in A1:
4 - Formula:
=ISEVEN(A1) - Result:
TRUE(since 4 is an even number).
Example 2: Odd number
- Data in A2:
7 - Formula:
=ISEVEN(A2) - Result:
FALSE(since 7 is an odd number).
Example 3: Non-integer number
- Data in A3:
3.5 - Formula:
=ISEVEN(A3) - Result:
FALSE(since 3.5 is not an integer).
Key Points:
- Integer Values: The ISEVEN function works by checking if the number is an even integer. Non-integer numbers, like decimals, return
FALSE. - Negative Numbers: The function treats negative numbers correctly. For example:
ISEVEN(-4)will returnTRUE(since -4 is even).
- Non-Numeric Values: If the
numberargument is not a number or a reference to a cell containing a number, ISEVEN returns a#VALUE!error.
Use Cases:
- Conditional Formatting: Highlight even-numbered rows or cells:
=ISEVEN(ROW()) - Filtering: Use ISEVEN in conditional formulas to return values based on whether they are even or odd.