Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Charles
 
Posts: n/a
Default testing more than one variable in an if statement

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?
  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

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

or

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

depending on what you want

--

Regards,

Peo Sjoblom

"Charles" wrote in message
...
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?



  #3   Report Post  
Jay
 
Posts: n/a
Default


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(A13,A2<0),"good","bad")

  #4   Report Post  
Biff
 
Posts: n/a
Default

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

-----Original Message-----
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?
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I fix a circular reference in a financial statement? drjayhawk25 Excel Discussion (Misc queries) 0 February 7th 05 05:19 PM
7+ nested if statement? Turi Excel Worksheet Functions 3 December 20th 04 07:55 PM
Add 2nd variable to if statement - ifAnd? Todd F. Excel Worksheet Functions 4 December 18th 04 07:49 PM
Statement lintan Excel Worksheet Functions 1 December 2nd 04 11:31 PM
change function variable prompts?? thinkingfield Excel Worksheet Functions 1 November 8th 04 04:01 PM


All times are GMT +1. The time now is 03:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"