Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

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

Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
  • Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
  • More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
  • Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
  • Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
  • Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
  • Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
  • More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.

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?


Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

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!
officetab bottom
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Vinicius · 2 months ago
    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.
  • To post as a guest, your comment is unpublished.
    Jash · 2 years ago
    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!
  • To post as a guest, your comment is unpublished.
    Rich · 2 years ago
    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!
  • To post as a guest, your comment is unpublished.
    Tamara · 2 years ago
    This did not work. It highlights random cells but not all the odd ones.
    • To post as a guest, your comment is unpublished.
      HM · 2 years ago
      when selecting the headers this problem occurs, select only cells that contain numbers