Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 414
Default If function with some "And" plus an "Or" criteria

Is this possible to do? I know how to do an If with AND:

IF(AND(criteria1,criteria2),True,False)

and I can do an OR:

IF(OR(criteria1,criteria2),True,False)

but can I do both? Thanks for any help.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default If function with some "And" plus an "Or" criteria

=IF(AND(criterion1,OR(criterion2,criterion3)),valu e_if_true,value_if_false)
or
=IF(OR(criterion1,AND(criterion2,criterion3)),valu e_if_true,value_if_false)
or nest the functions to suit your requirements.
--
David Biddulph

"Andy" wrote in message
...
Is this possible to do? I know how to do an If with AND:

IF(AND(criteria1,criteria2),True,False)

and I can do an OR:

IF(OR(criteria1,criteria2),True,False)

but can I do both? Thanks for any help.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default If function with some "And" plus an "Or" criteria

You can have multiple ANDs and ORs in a logic equation. But doing an OR will
include theh AND condition

AND Table
B
False True

A False False False
True False True


OR Table

B
False True

A False False True
True True True



The condition A = True and B = True is True in both tables above.


"Andy" wrote:

Is this possible to do? I know how to do an If with AND:

IF(AND(criteria1,criteria2),True,False)

and I can do an OR:

IF(OR(criteria1,criteria2),True,False)

but can I do both? Thanks for any help.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default If function with some "And" plus an "Or" criteria

Say you have a situation where you have multiple criteria, and you want a
true to return with the All of the following criteria:
1: Criteria1 OR Criteria 2
2: Criteria3
4: Criteria4 & Criteria5 or Criteria6
=IF(AND(OR(crit1,crit2),crit3,OR(AND(crit4,crit5), crit6)),TRUE,FALSE)
--
** John C **


"Andy" wrote:

Is this possible to do? I know how to do an If with AND:

IF(AND(criteria1,criteria2),True,False)

and I can do an OR:

IF(OR(criteria1,criteria2),True,False)

but can I do both? Thanks for any help.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default If function with some "And" plus an "Or" criteria

=if(and(a1=5,b1=3,or(c1=5,c1=17)),"a1=5 AND b1=3 And c1=(5or17)","one not true")

Andy wrote:

Is this possible to do? I know how to do an If with AND:

IF(AND(criteria1,criteria2),True,False)

and I can do an OR:

IF(OR(criteria1,criteria2),True,False)

but can I do both? Thanks for any help.


--

Dave Peterson
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
Text "comparison" operator for "contains" used in an "IF" Function Pawaso Excel Worksheet Functions 4 April 4th 23 11:35 AM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


All times are GMT +1. The time now is 02:53 PM.

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

About Us

"It's about Microsoft Excel"