#1   Report Post  
heater
 
Posts: n/a
Default Need a zero value

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


  #2   Report Post  
David Hepner
 
Posts: n/a
Default

See if this works for you:

=IF(AND(J5="",L5=""),0,L5/J5)

"heater" wrote:

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


  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

=if(count(j5,l5)=0,"",.....)

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

if both must be filled in.

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

heater wrote:

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


--

Dave Peterson
  #4   Report Post  
KL
 
Posts: n/a
Default

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" wrote in message
...
I need a zero value when J5 and L5 are empty (blank). I keep getting
#VALUE!. I've tried the following formulas:
=IF(J50,L5/J5,IF(J5<0,0))
=IF(J50,L5/J5,0)
=IF(J5=0,"",L5/J5)
All return #VALUE!




  #5   Report Post  
heater
 
Posts: n/a
Default

It worked - Thanks!

"David Hepner" wrote:

See if this works for you:

=IF(AND(J5="",L5=""),0,L5/J5)

"heater" wrote:

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




  #6   Report Post  
David Hepner
 
Posts: n/a
Default

Looking at this again, I would use OR instead of AND


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



"heater" wrote:

It worked - Thanks!

"David Hepner" wrote:

See if this works for you:

=IF(AND(J5="",L5=""),0,L5/J5)

"heater" wrote:

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


  #7   Report Post  
heater
 
Posts: n/a
Default

That works too!

"KL" wrote:

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" wrote in message
...
I need a zero value when J5 and L5 are empty (blank). I keep getting
#VALUE!. I've tried the following formulas:
=IF(J50,L5/J5,IF(J5<0,0))
=IF(J50,L5/J5,0)
=IF(J5=0,"",L5/J5)
All return #VALUE!





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"