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?
- 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.
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.
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.
You are guest
or post as a guest, but your post won't be published automatically.
- To post as a guest, your comment is unpublished.· 16 days agoi love you! Works like a charm!
- To post as a guest, your comment is unpublished.· 6 months agoPra 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.· 2 years agoIt 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.· 3 years agoI'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.· 3 years agoThis did not work. It highlights random cells but not all the odd ones.
- To post as a guest, your comment is unpublished.· 3 years agowhen selecting the headers this problem occurs, select only cells that contain numbers