+ Reply to Thread
Results 1 to 6 of 6

IF(MIN) Formula glitch

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

    IF(MIN) Formula glitch

    I'm not sure why I'm getting opposite status indications for the formula below in two columns of data (see attached-hopefully I attached correctly). The cells are formatted as "Numbers". An observation is that column E doesn't have any numbers in it, only text.

    Is there a better formula to prevent this?

    =IF(MIN(H23:H38)>=$C45,"Pass","Fail")

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: IF(MIN) Formula glitch

    =MIN(H23:H38) should return 4 (as long as those are actual numbers) and MIN(E23:E38) will return zero (MIN returns zero when there are no numbers in the range), so clearly the two formulas might give you different results - what's in C45, what results do you want to get and why?
    Audere est facere

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

    Re: IF(MIN) Formula glitch

    C45 is a numeric value (1.2). I want "Fail" if cell values are < 1.2, and "Pass" if >= 1.2. The "ND" text did not seem to adversely affect the formula when I first used it. But, when entering test data for a trial run, this problem occurred.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: IF(MIN) Formula glitch

    Well, as I said, MIN returns zero when there are no numbers in the range and 0<1.2 so you get "fail", if you expect "pass" when there are no numbers try this version

    =IF(OR(COUNT(E23:E38)=0,MIN(E23:E38)>=$C45),"Pass","Fail")

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

    Re: IF(MIN) Formula glitch

    Here is what I'm getting when I use formula; =IF(OR(COUNT(H23:H38)=0,MIN(E23:E38)>=$C45),"Pass","Fail"). The 1.0 value should cause "Fail".

    And, to clarify, the data that will be entered into the cells will be either a numeric value, "ND" or "1st Peak".

    Column E
    RRT 0.76
    ND
    ND
    ND
    ND
    ND
    ND
    ND
    ND
    ND
    ND
    1.0
    ND
    1st peak
    ND
    ND
    ND
    Pass

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

    Re: IF(MIN) Formula glitch

    Disregard my last post. I forgot to change the COUNT range. Now it works! Thanks!

+ 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