Skip to main content

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?

doc-highlight-odds1

Highlight odd or even numbers with Conditional Formatting


arrow blue right bubble 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:

doc-highlight-odds1

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:

doc-highlight-odds1

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.

doc-highlight-odds1

5. After selecting one color, click OK > OK to close the dialogs, then all the odd numbers have been highlighted.

doc-highlight-odds1

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

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions…
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

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...

Description


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!
Comments (9)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Supondo que você quer destacar todos os números pares da coluna "E" (que vai de E3 até E372), fórmula:
NOVA REGRA=MOD(E3;2)=0
APLICAÇÃO=$E$3:$E$372
=========================
Supondo que você quer destacar todos os números ímpares da coluna "E" (que vai de E3 até E372), fórmula:
NOVA REGRA=MOD(E3;2)=1
APLICAÇÃO=$E$3:$E$372
This comment was minimized by the moderator on the site
If it doesn't work for you, check these things:1. That you entered the name of the first cell in your list, not A12. That you selected a color to highlight the cell in the formatting options
I skimmed the article and screwed it up...
This comment was minimized by the moderator on the site
i love you! Works like a charm!
This comment was minimized by the moderator on the site
Pra quem não conseguiu, sigam todos os passos, porém modifiquem a fórmula para =mod(A1;2). Aquele "=0" no final é desnecessário. Mudem o "A1" conforme a célula que pretendem usar como referência. For those who, like me, couldn't make this work: follow all the steps but change the formula to "=mod(A1;2)". The "=0" in the end is unnecessary. Also, change the value "A1" according to the cell you would like to use as pattern.
This comment was minimized by the moderator on the site
It works! I thought about the conditional formatting I just didn't know which formula to use. Now I can use this method to add even/odd numbers by using a filter instead of using a complicated formula...e-z bree-z. Thank you!
This comment was minimized by the moderator on the site
I've tried this with both the 'isodd' function and the 'mod(xx,2)=1' but neither works. I get no errors. When I put the isodd/mod in a cell and then use that cell in the conditional format it works as expected. I'm using Excel 2016. Thanks!
This comment was minimized by the moderator on the site
This did not work. It highlights random cells but not all the odd ones.
This comment was minimized by the moderator on the site
when selecting the headers this problem occurs, select only cells that contain numbers
This comment was minimized by the moderator on the site
I've been struggling with this for the past hour, this commend saved me, thx!!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
Rate this post:
0   Characters
Suggested Locations