=IF(OR question

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

Guest

Hi,
Having a problem here. Essentially: In cell B9
=IF(either B6 OR B7=0,"",If(B6<B7,"",B6-B7)
Can someone sort this one out for me?

Thanks
 
Hi,
Having a problem here. Essentially: In cell B9
=IF(either B6 OR B7=0,"",If(B6<B7,"",B6-B7)
Can someone sort this one out for me?

Thanks

=IF(OR(B6=0,B7=0),"",IF(B6<B7,"",B6-B7))
 
=IF(OR(B6=0,B7=0,B6<B7),"",B6-B7)

however do you want zero if B6=B7, if not change the formula to

=IF(OR(B6=0,B7=0,B6<=B7),"",B6-B7)
 
Thanks to all. To take it one more step; if there was a range of cells (ie
B6:B18), rather than the two (B6 & B7) that need to be any value other than
0, how would the formula be modified?
 
Hard to modify your formula: what would would you be subtracting from
what in that case?

Perhaps you can modify:

=IF(COUNTIF(B6:B18,0)=0,<some formula>,"")
 
=IF(COUNTIF(B6:B18,0)>0,"", and so on

depending on what you want, the above test if any of those cells are zero
 
Hi JE,
it was only hypothetical. I was curious to see if it was possible to use a
range of cells with the OR function because putting OR(B6=0,B7=0,B8=0,B9=0)
etc is a bit messy.
 

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

Back
Top