Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Conditionally Formatting Non-Integers.

# Conditionally Formatting Non-Integers

Written by Allen Wyatt (last updated June 25, 2022)
This tip applies to Excel 97, 2000, 2002, and 2003

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 a large number of ways that this can be done, and a number of 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 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 (8482) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) 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

Displaying Path Names in the Menu Bar

Want the full path name for a document visible on the screen? Easily add it to a menu bar.

Discover More

Copying and Pasting Non-Contiguous Ranges of Cells

Excel makes it easy to copy and paste a range of cells. Easy, that is, unless the range isn't contiguous. If you have a ...

Discover More

Positioning a Graphic in a Macro

Macros are a great way to process information in a worksheet. Part of that processing may involve moving graphics around ...

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

Diagonal Borders in a Conditional Format

Conditional formatting is a great tool for changing how your data looks based on the data itself. Excel won't allow you ...

Discover More

If you need to shade alternating rows in a data table, you'll want to examine how you can accomplish the task with ...

Discover More

Conditional Formats that Distinguish Blanks and Zeroes

Conditional formatting is a great tool. You may need to use this tool to tell the difference between cells that are empty ...

Discover More
##### Subscribe

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

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 5 + 2?

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 menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.