and/or statement?

T

todd

I need to get a true or false if all my conditions are
met. Do I combine the and/or funtions to do that?

Here is what I have got.
=IF(OR(AND(J28=0,K28=0,L28=0,M28=0)),"",IF(COUNT(J28:K28)
=2,K28*J28,"")+IF(COUNT(L28:M28)=2,M28*L28))

I am working on a formula that the range may or may not
contain formulas,numbers or return "". I want to have the
formula return "" if ALL the cells in the range =0 or "".
(if it returns 0 then it messes with a formula on a
another worksheet).


TIA
Todd
 
M

Michael J. Malinsky

I wasn't sure based on your post, but it looks like this is what you are
looking for:

=IF(OR(AND(J28=0,K28=0,L28=0,M28=0),COUNT(J28:M28=0)),"",IF(COUNT(J28:K28)=2
,K28*J28,"")+IF(COUNT(L28:M28)=2,M28*L28))

HTH
 
H

Harlan Grove

...
...
=IF(OR(AND(J28=0,K28=0,L28=0,M28=0),COUNT(J28:M28=0)),"",IF(COUNT(J28:K28)=2
,K28*J28,"")+IF(COUNT(L28:M28)=2,M28*L28))
...

Is the 'COUNT(J28:M28=0)' term a typo for 'COUNT(J28:M28)=0'?

=IF(SUMPRODUCT((J28:M28<>0)*(J28:M28<>"")),your_formula_here,"")
 
A

Aladin Akyurek

Harlan Grove said:
...
..

J28:M28 == {-1,-2,-3,6} ?

Ok, better not to make assumptions, left implicit.

=IF(OR(COUNTIF(J28:M28,0)=4,COUNTBLANK(J28:M28)=4),"",SUM(IF(COUNT(J28:K28)
=2,K28*J28,""),IF(COUNT(L28:M28)=2,M28*L28)))
 
M

Michael J. Malinsky

Seems weird since I copied it directly from the formula bar...it seems that
I would have generated an error.....
 

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

Top