How to highlight odd or even numbers in Excel?
In Excel, if you want to highlight all odd values with one color and fill all even numbers with another color to differentiate them as following screenshot shown. How could you quickly and easily solve this task?
Highlight odd or even numbers with Conditional Formatting
Highlight odd or even numbers with Conditional Formatting
Conditional Formatting is a useful feature, it can help you quickly highlight odd numbers or even number in worksheet. Please do with the following steps:
1. Select the cells that contain the data values.
2. Then click Home > Conditional Formatting > New Rule, see screenshot:
3. In the New Formatting Rule dialog box, select Use a formula to determine which cells to format option, and then type this formula =MOD(A1,2)=1 or =ISODD(A1) (A1 indicates the first cell in your selected range, you can change it as you need) into the Format values where this formula is true text box. See screenshot:
4. Then click Format button to open the Format Cells dialog box, in the popped out dialog, click Fill tab, and then choose one color you like.
5. After selecting one color, click OK > OK to close the dialogs, then all the odd numbers have been highlighted.
Notes:
1. If you want to highlight all even numbers with another color, you can repeat the above steps, and apply this formula =MOD(A1,2)=0 or =ISEVEN(A1) (A1 indicates the first cell in your selected range, you can change it as you need) in step 3.
2. Conditional Formatting tool is a dynamic function, if you change any odd values to even values, the color will be adjusted as well.
Related article:
How to count / sum odd / even numbers or rows in Excel?
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!









