Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default Combining functions AND and OR

What is the proper syntax for using AND and OR together in the same
statement? I want to say IF C2=x1 OR c2=x2 OR c2=x3 OR c2=x4, AND c4=y1 OR
c4=y2 OR c4=y3, THEN, ELSE. I can't seem to get it right. Help, please.
Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,939
Default Combining functions AND and OR

Give this a whirl...

=if(and(or(C2=x1, c2=x2, c2=x3, c2=x4), 0r(c4=y1,
c4=y2, c4=y3)), "Then", "Else")

--
HTH...

Jim Thomlinson


"Jan Buckley" wrote:

What is the proper syntax for using AND and OR together in the same
statement? I want to say IF C2=x1 OR c2=x2 OR c2=x3 OR c2=x4, AND c4=y1 OR
c4=y2 OR c4=y3, THEN, ELSE. I can't seem to get it right. Help, please.
Thanks in advance.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,311
Default Combining functions AND and OR

Try this:

=IF(AND(OR(C2=X1,C2=X2,C2=X3),OR(C4=Y1,C4=Y2,C4=Y3 )),"Criteria
Matched","Criteria NOT Matched")

Regards,
Paul

"Jan Buckley" wrote in message
...
What is the proper syntax for using AND and OR together in the same
statement? I want to say IF C2=x1 OR c2=x2 OR c2=x3 OR c2=x4, AND c4=y1 OR
c4=y2 OR c4=y3, THEN, ELSE. I can't seem to get it right. Help, please.
Thanks in advance.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 618
Default Combining functions AND and OR

=IF(AND(OR(C2=x1,c2=x2,c2=x3,c2=x4),OR(c4=y1,c4=y2 ,c4=y3)),"Then
condition","Else condition")
--
David Biddulph

"Jan Buckley" wrote in message
...
What is the proper syntax for using AND and OR together in the same
statement? I want to say IF C2=x1 OR c2=x2 OR c2=x3 OR c2=x4, AND c4=y1 OR
c4=y2 OR c4=y3, THEN, ELSE. I can't seem to get it right. Help, please.
Thanks in advance.



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



All times are GMT +1. The time now is 10:05 PM.

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"