Thread: format
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default format

Because of the way computers store decimal numbers (number to base 10) in
binary form (numbers to base 2) it often happens that a calculation that
should yield exactly zero will actually result in a very small number like
0.000000000012. This only happens with real (that is, non-integer numbers)

So it is advisable never to test for exactly zero but rather to test for
'smallness'

=IF(ABS(A1-B1) < 1E-10, .....
=IF(ROUND(A1-B1, 10) =0, ....

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"MV" wrote in message
...
I am subtracting two cells which contain time and the result is zero. but
when I am using conditional formatting to hide zero I can not. what can be
the reason?