sum formula that includes zero?

  • Thread starter Thread starter Todd
  • Start date Start date
T

Todd

I am confused! I have a fornmula that might include a 0
in any of its cells and I am try to return the answer
or "" if False.

if(SUM(K15*J15)+(M15*L15),"")

is what I am using. It returns "Value" if L15 or M15 = 0
or "". I tried: =IF(OR
(K16<>"",J16<>"",M16<>"",L16<>""),SUM(K16*J16)+
(M16*L16),"")

This seems to work in a different workbook but not on the
one I need it for. Where am I going wrong?

TIA

Todd
 
In one or more cells in J15:L15 apparently houses a text value (maybe a
formula-generated blank). Adding (with +) or multiplying (*) such cells lead
inevitably to a #VALUE! error. It's better to avoid text values in cells
that participate in formulas using operators like +, -, *, or ^. Otherwise,
you'll need complex formulas like this...

=IF(COUNT(J15:K15)=2,J15*K15,0)+IF(COUNT(L15:M15)=2),L15*M15,0)

or

=IF(COUNT(J15:M15)=4,K15*J15+M15*L15,"")
 
if(SUM(K15*J15)+(M15*L15),"")
is
if(SUM(K15*J15)+SUM(M15*L15),"")
or
if(K15*J15+M15*L15,"")


assuming that if the formula <> 0 then ""
is want you want and the word false if 0

or did you want

if(K15*J15+M15*L15>0,K15*J15+M15*L15,"")

Lance
 
Back
Top