What is the ISEVEN function?
=ISEVEN(number)ISEVEN returns TRUE if a number is even. It is most often used inside IF to treat values differently.
Column A of the sheet mixes text, numbers, a blank, a logical value, errors and text that looks like a number; column B says what each is. Column C shows the same formula copied down.
ISEVEN appears when you split work by even and odd page numbers, sort rooms or jersey numbers into two groups, or shade every other row. Decimals are judged by their integer part, so make sure the value is a whole number first.
Arguments
- number
- The value or cell to test.
ISEVEN examples
Example 1. Check for even
=ISEVEN(A3)120 is even, so TRUE.
Example 2. Decimals
=ISEVEN(2.5)Its integer part is 2, so TRUE.
Example 3. Results for different values
=ISEVEN(A2)0 and blank cells count as even.
A2 =ISEVEN(A2) 120 TRUE -7 FALSE 2.5 TRUE 0 TRUE Blank TRUE Example 4. Shade even rows
=ISEVEN(ROW())Used as a conditional formatting rule, it shades rows 2, 4, 6 and so on.
Common mistakes
Passing text
Anything that is not a number returns #VALUE!.
Blank cells
A blank cell is treated as 0, so TRUE.
Empty rows count as even
Because blanks are TRUE, rows nobody has filled in also show as even. Exclude them with =AND(A2<>"", ISEVEN(A2)).
FAQ
- Odd numbers?
- Use ISODD.
- Can MOD do it?
- Yes: =MOD(A3,2)=0 runs the same test.
- How do I add only even numbers?
- =SUMPRODUCT((MOD(A2:A10, 2)=0)*A2:A10).