View Single Post
  #3   Report Post  
Govind
 
Posts: n/a
Default

Hi,

Lets say the first cell in your range is A1, hightlight the entire
range, then go to Format-conditional formatting and choose 'cell value'
and choose 'greater than' and enter this formula

=INT(A1)

and choose the format you need.

INT(A1) roundsdown the value of the cell to a whole number. If there is
a decimal, then the value in the cell would be greater than the Integer
value of the cell and hence this formula will highlight the numbers with
decimals.

Govind.

excelgurudummy wrote:
I have a spreadsheet that I want to highlight cell values that are whole
or real numbers - not decimals. I am having a heck of a time trying to
figure out the best way to do this. At this point, I really
don't care if they are highlighted or what, as long as the whole numbers
stand out somehow. The cells themselves contain a formula (i.e., B$1/A2)
So, if this formula results in a whole number (i.e., 1, 2, 3, 4 etc...)
not a decimal (i.e., 1.1, 1.2, 1.3, etc...) then I want it to stand
out.

I even tried nesting an "IF" function so that anything containing a
decimal would show the word "NO" instead of the value, but I couldn't
get it to work. Here's the formula I was trying, maybe someone can tell
me what I did wrong with it.

=IF(PRODUCT(B$1/A2),"*.*","NO",PRODUCT(B$1/A2))
I get an error that I'm using too many arguements.

Please help! Thank you in advance.
ExcelGuruDummy