IF AND OR

T

The Rook

I currently have 3 columns of data and am wanting to add a 3rd based on the
criteria in the other 3, as follows:

If col A >30 and col B >30 = 10
or
If col A >30 and col c >30 = 10
or
If col c >30 and col B >30 = 10

What is the bast way to do this?
 
M

macropod

Hi,

If exactly two conditions need to be met, you could try:
=IF((A1>30)+(B1>30)+(C1>30)=2,1,0)
If more than one condition needs to be met (eg all 3 might be >30), you could try:
=IF((A1>30)+(B1>30)+(C1>30)>1,1,0)

Cheers
 
B

Bob Phillips

A formula

=IF(OR(AND(A2>30,B2>30),AND(A2>30,C2>30),AND(B2>30,C2>30)),10,"")

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
M

macropod

Oops, make that:

If exactly two conditions need to be met, you could try:
=IF((A1>30)+(B1>30)+(C1>30)=2,10,0)
If more than one condition needs to be met (eg all 3 might be >30), you could try:
=IF((A1>30)+(B1>30)+(C1>30)>1,10,0)

Cheers
 
Top