View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ted
 
Posts: n/a
Default Help with #VALUE! error please...

hi, no - they contain formula, sorry. Is there a way of gettign it to ignore
the formula and return a zero when there are no numbers in the cell - it
displays the answer to a previous formula.

thanks, Ted.

"Ron Rosenfeld" wrote:

On Mon, 21 Nov 2005 09:09:06 -0800, Ted wrote:

Hi, can anyone tell me how to change the value of an empty cell to a zero
please?

I am using =SUM(A1-B1 A2-B2 A3-B3 and so on)

It performs the sum ok and everything, but when one of the cells is blank,
it just returns a #VALUE massage, because its being asked to sum blanks etc.
How can I get around this please, and have a zero appear in the answer cells
(C1 C2 C3 etc)??

Thanks in advance,

Ted.


=SUM(A1-B1) should not produce an error if either or both cells are blank.

And neither will the equivalent and simpler formula =A1-B1

I suspect that either A1 or B1 or both are NOT blank. What is the result of
these formulas:
=ISBLANK(A1)
=ISBLANK(B1)

One method of outputting a zero unless A1 and B1 BOTH contain numbers is:

=IF(COUNT(A1:B1)=2,A1-B1,0)


--ron