if function equals zero...

S

serdar

I have a long function in a cell thats gets value of another cell. what i
want to do is, if it equals zero then set value to ""

= IF( my_long_function=0 ; "" ; my_long_function)

the function is too long and could be cause errors when uncareful changes
made in it (some other people will use it).

-how to simplify the above statement?
 
B

Bob Phillips

The only suggestions I can give are

- work out which part might drive the 0 result and test just that, or
- put the formula in another cell and test that cell

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
D

Dave Peterson

Since you're not distinguishing between "" and 0, how about just leaving the
function as-is:

=my_long_function

but then give the cell a nice custom format to hide the 0.

General;-General;;@
(positive;negative;0;text)

Although the cell will look empty, you'll still see the 0 in the formula bar --
and it could cause trouble with formulas that rely on that cell.
 
Top