View Single Post
  #5   Report Post  
David McRitchie
 
Posts: n/a
Default

A formula cannot empty a cell, it can create an empty string.

The other consideration here is if the zero was from a formula
you will be wiping out the formula so the cell will not show a value
if the referenced cell later change their value.

You have another reply suggesting hiding zero values by means
of the Tools, options. Which means you will not be able to
distinguish a manually entered zero from an empty cell.

Rather than changing all worksheets in all workbooks to hide
zeros, you might use a custom fromat where the third operand
is empty -- you must include your separation character to show
that it is to be missing;
General;General;;@

If you hide a value with a null string in a formula
B34: =IF(A34=0,"",A34)
you can not use it in
an addition formula =A34+B34
but you could ignore it using SUM Worksheet Function
=SUM(A34,B34) or =SUM(A34:B34)
Custom formatting cannot change the value, it changes the
display so it would still have the zero and work arithmetically.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"pewe" wrote,..
Thanks Anne.

I was expecting something more complex (such as a formula) and never thought
to use such a simple solution.