testing more than one variable in an if statement

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

Guest

I would like to be able to test more than one variable in an if statement.
Such as the contents of a1 and the contents of a2. Is this possible?
 
=IF(OR(A1="x",A2="x"),"yes","no")

or

=IF(AND(A1="x",A2="x"),"yes","no")

depending on what you want
 
Hi!

Yes, this is possible but you need to provide more
specific info.

Here are a few things you can do:

=IF(OR(A1="",B2="")......
=IF(AND(A1="",B2="").....
=IF(A1="",IF(B2<>100.....

Biff
 
I would like to be able to test more than one variable in an if
statement. Such as the contents of a1 and the contents of a2. ...

Check out "logical" functions like AND and OR. Example:
=IF(AND(A1>3,A2<0),"good","bad")
 

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