simple formula

B

Brian

I am having trouble with "and" , "or" in my formulas.

If I want one of c1:c4 to be true is this the formula to use
=if((c1:c4)>d1),g1,"") or should I use =if(or(c1:c4)>d1),g1,""). Neither one
of these formulas seems to work. In other words, I am trying to write a
shorter formula for the following:

=if(c1>d1 or c2>d1 or c3>d1 or c4>d1, G1,"")

Thanks for help with this simple formula.
 
B

Biff

Try one of these:

normally entered:

=IF(OR(C1>D1,C2>D1,C3>D1,C4>D1),G1,"")

array entered with the key combo of CTRL,SHIFT,ENTER:

=IF(OR(C1:C4>D1),G1,"")

Biff
 
P

paul

and will return true if all arguements are true,or will return true if only
one argument is true
 
D

Duke Carey

Try

=if(or(c1:c4)>d1,g1,"")

but commit the formula by pressing Ctrl-Shift-Enter to make it an array
formula
 
B

bj

This may be a second response but
try
=if(or(C1>D1,C2>D1,C3>D1,C4>D1),G1,"")
or
=if(max(C1:C4)>D1,G1,"")
 
G

Greg Neill

Brian said:
I am having trouble with "and" , "or" in my formulas.

If I want one of c1:c4 to be true is this the formula to use
=if((c1:c4)>d1),g1,"") or should I use =if(or(c1:c4)>d1),g1,""). Neither
one
of these formulas seems to work. In other words, I am trying to write a
shorter formula for the following:

=if(c1>d1 or c2>d1 or c3>d1 or c4>d1, G1,"")

Thanks for help with this simple formula.

How about

=if (MAX(c1:c4)>d1,g1,"")
 
Top