How can I use conditional formatting in Excel to highlight even and odd values in a data set?

Conditional formatting in Excel is a powerful tool that allows users to highlight specific data within a data set based on certain criteria. One useful application of this feature is to highlight even and odd values in a data set. By using conditional formatting, users can easily differentiate between even and odd values, making it easier to analyze and interpret the data. This can be done by setting up a conditional formatting rule that applies a specific format, such as a different color or font, to cells containing even or odd values. This simple yet effective function can greatly enhance the visual presentation of data and aid in decision-making processes.

Excel: Conditional Formatting Based on Even and Odd Values


To apply conditional formatting to cells in Excel based on even and odd values, you can use the New Rule option under the Conditional Formatting dropdown menu within the Home tab.

The following examples show how to use this option in two different scenarios:

Scenario 1: Apply Conditional Formatting Based on Even and Odd Values in Cells

Scenario 2: Apply Conditional Formatting Based on Even and Odd Row Numbers

Let’s jump in!

Example 1: Apply Conditional Formatting Based on Even and Odd Values in Cells

Suppose we have the following dataset in Excel that contains information about various basketball players:

Suppose we would like to highlight all cells in the Points and Assists columns that have an even number in them.

To do so, we can highlight the cell range B2:C11, then click the Conditional Formatting dropdown menu on the Home tab and then click New Rule:

In the new window that appears, click Use a formula to determine which cells to format, then type =ISEVEN(B2) in the box, then click the Format button and choose a fill color to use.

Excel conditional formatting based on even and odd numbers

Once we press OK, all of the cells in the range B2:C11 that contain an even number will be highlighted:

We can see that each cell in the Points and Assists columns that have an even number in them are highlighted with a light green background.

Example 2: Apply Conditional Formatting Based on Even and Odd Row Numbers

Once again suppose we have the following dataset in Excel that contains information about various basketball players:

Suppose we would like to highlight all rows in the dataset with an even number.

To do so, we can highlight the cell range A1:C11, then click the Conditional Formatting dropdown menu on the Home tab and then click New Rule:

In the new window that appears, click Use a formula to determine which cells to format, then type  =EVEN(ROW())=ROW() in the box, then click the Format button and choose a fill color to use.

Once we press OK, all of the even-numbered rows in the range A1:C11 will be highlighted:

Excel conditional formatting based on even and odd row numbers

Note: We chose to use a light green fill for the conditional formatting in this example, but you can choose any color and style you’d like for the conditional formatting.

Additional Resources

The following tutorials explain how to perform other common operations in Excel:

x