Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Conditionally Formatting Non-Integers.

Conditionally Formatting Non-Integers

Written by Allen Wyatt (last updated January 13, 2024)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021


Makik has a list of numeric values. Some are integers; some have digits to the right of the decimal. He would like to use conditional formatting to highlight those values that have digits to the right of the decimal point.

There are many ways that this can be done, and several different approaches. I won't go into how to define a conditional format here; such information has already been covered in other issues of ExcelTips. Instead, I'll focus on the condition itself and how you should select the condition to test.

If you know that the list will only contain numeric values, then you could use any number of formulas to determine whether the value is a non-integer. These are just a few that can be used if you specify that the condition contains a formula:

=MOD(A1,1)>0
=A1<>INT(A1)
=A1-INT(A1)>0
=NOT(A1=INT(A1))
=(A1-TRUNC(A1))>0
=ABS(A1)-INT(ABS(A1))>0
=IF(FIND(".",A1),1,0)
=(A1-(ROUNDDOWN(A1,0))>0)

The various formulas (and there could be many more listed) basically check to see if the unaltered value in the cell is equal to a version that makes sure there is nothing to the right of the decimal.

If you prefer (for some reason) to not rely upon a formula to define your condition, then you can choose "cell value is greater than" and set the condition as ROUNDDOWN(A1,0). You could also use "not equal to" in the condition and you could change ROUNDDOWN to ROUNDUP. Either way, you are testing to determine whether a rounded version of the number (rounded to the nearest integer) is equal to the original value or not.

You should note that if any integer value in your list is formatted with decimal places, then such a value won't be "caught" by these conditional formats. For instance, if a cell contains the value 41 but the cell is formatted to display the value as 41.00, that value won't be "marked" by the conditional format as having something to the right of the decimal point. The reason is that the value really is an integer; it is just the display that adds the decimal point and two zeros.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8484) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Excel here: Conditionally Formatting Non-Integers.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Saving a Preview with Your Template

Templates provide a collection of styles and boilerplate for new documents. Selecting the right template by filename only ...

Discover More

Averaging the Last Numbers in a Column

Need to calculate a running average for the last twelve values in a constantly changing range of values? The formula ...

Discover More

Displaying a Count of Zeros on the Status Bar

Excel allows you to display the results of several common worksheet functions on the status bar. The available functions ...

Discover More

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

More ExcelTips (ribbon)

Deleting Conditional Formatting

After you've applied a conditional format to a cell, you may have a need to later delete that format so that the cell is ...

Discover More

Working with Multiple Conditions

When you apply conditional formatting, you are not limited to using a single condition. Indeed, you can set up multiple ...

Discover More

Protecting Conditional Formatting

When you apply conditional formatting to the cells in your worksheet, those rules can seem a bit fragile at times. For ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 6 + 5?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.