IF OR Statements

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

Anybody know how to write a formula for a statement involving "if" and "or"
statements such as:

if (cell x=? and (cell y=? or cell z=?)) then cell Q=? or blank
 
In general terms:
=IF(AND(X=?,OR(Y=?,Z=?)),?,"")
This formula would have to be in cell Q

An example with actual cells:
=IF(AND(A1=10,OR(A2=15,A3=20)),100,"")
This formula must be in the cell to which the result should be returned. A
formula can't "reach out" and put a value in another cell; it just returns a
value to the cell that has the formula.

Please note that a formula can return an empty string "" which makes it
appear empty, but it is not actually blank (it contains the formula).

Hope this helps,

Hutch
 
EXCEL 2007

Here is the syntax you require:-

=IF(OR(D5="Finance",D5="Training"),100,20)

You need to adpat the above to your needs.

The above says that if cell D5 is Finance or Training then 100 otherwise 20.

If my comments have helped please hit Yes.

Thanks.
 
Try this:

=IF(AND(A1=1,OR(A2=2,A3=3)),"Q","")

Next time give proper cell references rather than "cell x".

Hope this helps.

Pete
 
Example formula:

=IF(AND(A1=2,OR(A2=3,A3=3)),TRUE,FALSE)

The OR and AND function contain their arguements.
 
Back
Top