+ Reply to Thread
Results 1 to 4 of 4

IF Function for Multiple Criteria

  1. #1
    Registered User
    Join Date
    11-28-2011
    Location
    Marshfield, Wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    12

    IF Function for Multiple Criteria

    I need to return a "Y" if multiple criteria are met.

    This is what i have, =IF(AND(A16=A17,I17<>""),OR(AND(I17<>"",A17=A16,K16="Y"))=TRUE,"Y")

    I want the formula to return a "Y" if either of the two sets of criteria are met, the "OR" being the seperator between the two sets of criteria.

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: IF Function for Multiple Criteria

    You really only have a single set of criteria: A16=A17 and I17<>"", because these are components of the "second" set of criteria you've already stipulated these must be met so no need (as I see it) to test if K16 = "Y". (You did change the order of the components in the second set of criteria but this has no bearing on how Excel processes the arguments.)

    Consider: if A16 = A17 is TRUE and I17<>"" then you have met the first set of criteria, therefore show "Y"; however in the second set of criteria, if both arguments are true and K16 if FALSE ( does not equal "Y"), then you have still met the first criteria and should show "Y" even though K16 fails the test.

    What do you want the formula to return if none of the criteria are met?

    Seems you only need: =IF(AND(A16=A17,I17<>""),"Y",?)

    Where ? is the value to return if the criteria are not met.
    Last edited by Palmetto; 12-27-2011 at 03:50 PM.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Registered User
    Join Date
    11-28-2011
    Location
    Marshfield, Wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: IF Function for Multiple Criteria

    what i want is actually two things to return "Y"
    if a1=a2 and i1 is blank, ="Y"
    If a1=a2 and i1 is not blank and the return value of the above equation is "Y", ="Y"

    This is what is came up with but doesn't quite work: =IF(AND(A8=A9,I8=""),OR(AND(I9<>"",A9=A8,K8="y")),"Y","N")

    Thanks for the help

    Quote Originally Posted by Palmetto View Post
    You really only have a single set of criteria: A16=A17 and I17<>"", because these are components of the "second" set of criteria you've already stipulated these must be met so no need (as I see it) to test if K16 = "Y". (You did change the order of the components in the second set of criteria but this has no bearing on how Excel processes the arguments.)

    Consider: if A16 = A17 is TRUE and I17<>"" then you have met the first set of criteria, therefore show "Y"; however in the second set of criteria, if both arguments are true and K16 if FALSE ( does not equal "Y"), then you have still met the first criteria and should show "Y" even though K16 fails the test.

    What do you want the formula to return if none of the criteria are met?

    Seems you only need: =IF(AND(A16=A17,I17<>""),"Y",?)

    Where ? is the value to return if the criteria are not met.

  4. #4
    Registered User
    Join Date
    11-28-2011
    Location
    Marshfield, Wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: IF Function for Multiple Criteria

    I Got it! this is how it looks now:

    =OR((AND(A2=A1,J1="")),(AND(J1<>"",A2=A1,M1=TRUE)))

    I had to do some research on how the OR function works. Thanks to Palmetto for the help.

    Quote Originally Posted by knakw00 View Post
    what i want is actually two things to return "Y"
    if a1=a2 and i1 is blank, ="Y"
    If a1=a2 and i1 is not blank and the return value of the above equation is "Y", ="Y"

    This is what is came up with but doesn't quite work: =IF(AND(A8=A9,I8=""),OR(AND(I9<>"",A9=A8,K8="y")),"Y","N")

    Thanks for the help

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1