- Select the cells with odd and even values.
- Select the Home tab of the ribbon and click on the Conditional Formatting option in the Styles group. Excel displays a palette of options related to conditional formatting.
- Click New Rule, and Excel will display the New Formatting Rule dialogue box.
- In the Select a Rule Type area, select Use a Formula to Determine Which Cells to Format.
- In the Format Values Where This Formula Is True box, enter the following formula: =MOD(A1,2)=1. This formula returns a True value if the cell contains an odd value. (Replace A1 with the first cell in the selected range)
- Select Format to open up the Format Cells dialogue box.
- Select a format that you want to apply to cells that contain an odd value.
- Click OK to close the Format Cells dialogue box. The formatting you selected in step 7 should now appear in the preview area for the rule.
- Click OK. Excel applies the conditional formatting to the cells you selected in step 1.
- Repeat steps 1 through 9 for the second condition, but use the formula =MOD(A1,2)=0. This formula returns True if the cell contains an even value.
- Click OK. Excel applies the conditional formatting to the cells you selected in step 1.
Once this conditional formatting is applied, odd cells will be one colour and even another colour. If the cell contains text, the conditional formatting will not apply. Conditional formatting takes precedence over any other styles you apply to a cell.