format

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
Rather than using conditional formatting, go to Tools|Options|View and untick
the "zero values" tick box.
 
If you mean the cell still shows 0:00 then I would think that the value is
not a true zero. Try re-formatting the cell as General and see if there is
a small residual value in there.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
What condition are you using in your conditional formatting?

One possibility (if your cell contents were the result of previous
calculations) is that with the fixed point binary representation there may
be rounding errors so that you have a resulting value close to zero but not
identically zero, so it may be worth checking that.
 
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
 
Back
Top