+ Reply to Thread
Results 1 to 5 of 5

IF(AND(COUNT one incident between a lower and upper limit

Hybrid View

  1. #1
    Registered User
    Join Date
    05-10-2012
    Location
    Olathe, KS
    MS-Off Ver
    Excel 2010
    Posts
    42

    IF(AND(COUNT one incident between a lower and upper limit

    Here's my formula challenge . .

    I'm using this formula which gives me an undesired "Fail" indication if only one value is less than 10:
    =IF(AND(COUNT(D27:D38)>=1,MIN(D27:D38)>=$F$48,MAX(D27:D38)<=$G$48),"Pass","Fail")

    Here's what I need . . .

    If all of the values are less than 10, I need a “Fail” indication.

    If only one of the values in the range is >= 10 AND <=30, I want a “Pass” indication, OR if all of the values in the range are>= 10 AND <=30, I want a “Pass” indication.

    Also, if any one value exceeds 30, then I want a “Fail” indication.

    D
    15.0
    17.9
    17.9
    15.7
    11.1
    10.4
    10.4
    20.9
    20.9
    20.9
    20.9
    20.9


    46 F G
    47 NLT NMT
    48 10 30

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: IF(AND(COUNT one incident between a lower and upper limit

    That one set of data doesn't really demonstrate the hurdles. Can you provide more including the "strange" ones that are the difficult ones you're dealing with?


    Logic in order:
    1) If any value > 30 ... FAIL IMMEDIATELY
    2) If all the values are < 10 ... FAIL IMMEDIATELY
    3) If there are then ANY values between 10 and 30 ... PASS, else FAIL

    That's how I'm reading your verbal description.

    Truth is, I'm not sure we even need #3, if #1 and #2 don't fail, then I think there's at least one value in the range is in between, so PASS.

    =IF(OR(COUNTIF($D$27:$D$38,">30")>0,COUNTIF($D$27:$D$38,"<10")=COUNT($D$27:$D$38)),"Fail","Pass")
    Last edited by JBeaucaire; 06-19-2012 at 11:34 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    05-10-2012
    Location
    Olathe, KS
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: IF(AND(COUNT one incident between a lower and upper limit

    BTW, how do you avoid the "too many arguments" error when selecting cell ranges? I have some cells that break into the range where the formula does not apply.

  4. #4
    Registered User
    Join Date
    05-10-2012
    Location
    Olathe, KS
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: IF(AND(COUNT one incident between a lower and upper limit

    Your equation worked. A cell break in the range does not adversely affect your formula.

  5. #5
    Registered User
    Join Date
    05-10-2012
    Location
    Olathe, KS
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: IF(AND(COUNT one incident between a lower and upper limit

    The 7.5 in this set gives an undesired Fail. This condition is the only challenge to a correct formula. . I think! I will try your formula next. Thanks.

    15.0
    17.9
    17.9
    15.7
    11.1
    7.5
    10.4
    20.9
    20.9
    20.9
    20.9
    20.9
    Fail

+ 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