Excel Formulas

A

Aravind

While printing a excel sheet I do not want cells containing formulas printing
zeroes or any other characters like error values, it should print just empty.
 
S

Sandy Mann

Jim Cone said:
Change your formulas so they return "" instead of zeros or error values

Wasn't the OP asking how you it is that you do that?

To the OP:

If =G2+H2 is returning 0 when both cells are empty then use:

=IF(AND(G2="",H2=""),"",G2+H2)

If it could return an error value then you could use:

=IF(OR(ISERROR(G2+H2),AND(G2="",H2="")),"",G2+H2)

However, if it was returning that error because one of the cells had text in
it, the the second formula would hide that fact. It would be much better to
deal with the source of the error rather than simply hide it.
--
HTH

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

[email protected]
Replace @mailinator.com with @tiscali.co.uk
 
H

Harlan Grove

...
....
=IF(OR(ISERROR(G2+H2),AND(G2="",H2="")),"",G2+H2)

Or use one test.

=IF(COUNT(1/(G2+H2)),G2+H2,"")
However, if it was returning that error because one of the cells had text in
it, the the second formula would hide that fact. It would be much better to
deal with the source of the error rather than simply hide it.

Very true.
 
A

Aravind

Thanks Jim for your immediate response. But I found another way.
Go to Tools>Options>View>Zero Values and untick the box.

But I don't know if it works when the cell shows error values
 
Top