Documentation/Calc Functions/ISEVEN
TDF LibreOffice Document Liberation Project Community Blogs Weblate Nextcloud Redmine Ask LibreOffice Donate
Function name:
ISEVEN
Category:
Information
Summary:
Determines whether a supplied number is even or odd. The sign of the number is ignored and if the value is not an integer, then any digits after the decimal separator are ignored.
Syntax:
ISEVEN(Value)
Returns:
Returns TRUE if the argument evaluates to an even number and FALSE if the argument evaluates to an odd number.
Arguments:
Value is an expression, or a reference to a cell containing an expression, that is to be tested for parity.
- If Value is not an integer, then any digits after the decimal point are ignored.
- The sign of Value is ignored.
- If Value evaluates to a string, then ISEVEN reports a parameter list error (Err:504).
Additional details:
- ISEVEN propagates errors. For example, if cell D1 contains the formula
=1/0
then the formula=ISEVEN(D1)
returns the #DIV/0! error. - If reference to an empty cell is passed to ISEVEN, then ISEVEN reports a parameter list error (Err:504) whereas Microsoft Excel’s ISEVEN function returns TRUE.
- If a text string or a reference to a cell containing a text string is passed to ISEVEN, then ISEVEN reports a parameter list error (Err:504) whereas Microsoft Excel’s ISEVEN function reports a #VALUE! error.
- The ISEVEN_ADD function is similar to ISEVEN but ISEVEN_ADD returns the value 1 for an even number and 0 for an odd number. In addition, ISEVEN_ADD does not report the parameter list error (Err:504) – if passed an empty cell it returns 1 and if passed a text string then it returns the #VALUE! error.
Examples:
Formula | Description | Returns |
---|---|---|
=ISEVEN(48) | The value 48 is even and so the function returns the logical value TRUE. | TRUE |
=ISEVEN(D1) where cell D1 contains the number 33. | The value 33 is odd and so the function returns the logical value FALSE. | FALSE |
=ISEVEN(0) | The value 0 is even and so the function returns the logical value TRUE. | TRUE |
=ISEVEN(−2.1) | The negative sign and the digits after the decimal separator are ignored. The value 2 is even and so the function returns the logical value TRUE. | TRUE |
=ISEVEN(3.999) | The digits after the decimal separator are ignored. The value 3 is odd and so the function returns the logical value FALSE. | FALSE |
Related LibreOffice functions:
ODF standard:
Related (or similar) Excel functions:
ISEVEN