ISEVEN & ISODD Functions – Test if Numbers are Even or Odd – Excel & Google Sheets

This tutorial demonstrates how to use the ISEVEN and ISODD Functions to test if numerical values are odd or even in Excel and Google Sheets.

ISEVEN main

ISEVEN Function Overview

The ISEVEN Function Test if cell value is even. Returns TRUE or FALSE.

To use the ISEVEN Excel Worksheet Function, select a cell and type:
iseven formula syntax

(Notice how the formula inputs appear)

ISEVEN Function Syntax and Inputs:

value – The test value

How to use the ISEVEN and ISODD Functions

The ISEVEN Function tests if a numerical value is even. If it’s even, the function returns TRUE, otherwise it returns FALSE.

ISEVEN

The ISODD Function does the opposite.

ISODD

Alternate Row Shading

The most common uses of the ISEVEN and ISODD Functions are to shade alternate rows using Conditional Formatting.

To do this, you will use the formula:

=ISEVEN(ROW()))

within Conditional Formatting:

  1. Select all the cells to shade
  2. Go to Home Ribbon > Conditional Formatting > New Rule
  3. Select ‘Use a formula to determine which cells to format
  4. Enter the formula =ISEVEN(ROW())
  5. Click the Format button and choose your desired formatting
  6. Click OK twice to quit and save.

ISEVEN Datavalidation

You can add a second conditional formatting rule to also shade the ODD Rows

ISODD Datavalidation

ISEVEN in Google Sheets

The ISEVEN Function works exactly the same in Google Sheets as in Excel:

ISEVEN Google

 

ISEVEN Examples in VBA

vba code generator
You can also use the ISEVEN function in VBA. Type:
Application.Worksheetfunction.Iseven(number)
For the function argument (number), you can either enter them directly into the function, or define variables to use instead.

Return to the List of all Functions in Excel