View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
zvkmpw zvkmpw is offline
external usenet poster
 
Posts: 153
Default Displaying cell contents

The easiest way will be by de-selection 'Zero values' - in Tools Options
View tab.
The longest way will be by using an IF statement which checks the condition.
It should read something like:
=IF(<calculation=0,"",<calculation)


A third way is to use this for the relevant cells:
Format Cells Custom
with something like this for Type:
General;-General;
This way, you can be selective about which cells show zero values and
which ones don't.

If the appearance is all that matters, there's not much more to say.

But be careful if the cells are used for further computation, because
0 and "" don't behave the same. To see this, in column A put
2
0
4
and in column B put
=AVERAGE(A1:A3)
=SUM(A1:A3)
=A1+A2+A3
Notice what appears in column B.

Then change A2 from 0 to "" and notice what changes in column B.

So think about how the values will be used when selecting an approach.