Need a zero value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need a zero value when J5 and L5 are empty (blank). I keep getting
#VALUE!. I've tried the following formulas:
=IF(J5>0,L5/J5,IF(J5<0,0))
=IF(J5>0,L5/J5,0)
=IF(J5=0,"",L5/J5)
All return #VALUE!
 
=if(count(j5,l5)=0,"",.....)

or maybe...
=if(count(j5,l5)<>2,"",.....)

if both must be filled in.

=count() counts numbers
=counta() counts anything
 
Hi,

Do you really mean the cells [J5] and/or [L5] are empty or do they return a
zero-length string as a result of a similar formula, such as
=IF(condition,1,""). If the latter is true then try the following formula:

=IF(OR(J5="",L5=""),"",L5/J5)

Regards,
KL
 
That works too!

KL said:
Hi,

Do you really mean the cells [J5] and/or [L5] are empty or do they return a
zero-length string as a result of a similar formula, such as
=IF(condition,1,""). If the latter is true then try the following formula:

=IF(OR(J5="",L5=""),"",L5/J5)

Regards,
KL


heater said:
I need a zero value when J5 and L5 are empty (blank). I keep getting
#VALUE!. I've tried the following formulas:
=IF(J5>0,L5/J5,IF(J5<0,0))
=IF(J5>0,L5/J5,0)
=IF(J5=0,"",L5/J5)
All return #VALUE!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top