How to highlight whole numbers in Excel?
Supposing, there are both integers and decimals in your worksheet, and now, you would like to apply the conditional formatting to stand out the whole numbers in your worksheet. Have you ever tried to solve this task by yourself? Today, I will tell you a useful formula to finish this job.
Recommended Productivity Tools for Excel
Office Tab: Bring powerful tabs to Office (include Excel), just like Chrome, Safari, Firefox and Internet Explorer. Save you half the time, and reduce thousands of mouse clicks for you. 30-day Unlimited Free Trial
Kutools for Excel: Save 71% of your time and solve 82% Excel problems for you. 300+ advanced tools designed for 1500+ work scenario, make Excel much easy and increase productivity immediately.60-day Unlimited Free Trial
To highlight only the integers in your worksheet, you can use the following formula in the conditional formatting, please do with these:
1. Select the range that you want to highlight the whole numbers.
2. Click Home > Conditional Formatting > New Rule, see screenshot:
3. In the New Formatting Rule dialog box, click Use a formula to determine which cells to format option under Select a Rule Type: list box, and then enter this formula =IF(LEN(A1),MOD(A1,1)=0,"") into the Format values where this formula is true: text box, (A1 is the first cell of your selection, you can change it as you need), see screenshot:
4. Then click Format button to open the Format Cells dialog, and choose one color you like under Fill tab, see screenshot:
5. And then click OK > OK to close the dialogs, and the whole numbers in your selected range have been highlighted with the color you choose.
1. If you want to highlight the decimals in the range only, you should apply this formula =MOD(A1,1)>0 within the Conditinal Formatting feature in above step 3.
2. Conditional Formatting tool is a dynamic function, the highlighted color will be adjusted with the changes of your number.