+ Reply to Thread
Results 1 to 14 of 14

logical function problem

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by meddington
    Perfect. Thanks!
    you're welcome.

  2. #2
    Registered User
    Join Date
    09-06-2005
    Posts
    20
    Ok, got another one.

    I'm wondering how to alter the code to include a third possiblity..."pass", "fail" or "Data missing". An array formula?

  3. #3
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by meddington
    Ok, got another one.

    I'm wondering how to alter the code to include a third possiblity..."pass", "fail" or "Data missing". An array formula?
    Hi
    Please make it more clear that when you want to return each of three possibilties.
    1) return "Fail" if even a single fail is found
    2) return "Pass" if all are pass
    3) return "Data missing" when???

  4. #4
    Registered User
    Join Date
    09-06-2005
    Posts
    20
    Please make it more clear that when you want to return each of three possibilties.
    1) return "Fail" if even a single fail is found
    2) return "Pass" if all are pass
    3) return "Data missing" when???
    "Data Missing" returned when an empty cell occurs...so its more than a question about the "=IF(COUNTIF(D7:D18,"fail"),"fail","pass")" formula being able to determine a third result, and also about the logical function determining a pass/fail to determine a third result as well. A logical test simply determines a true or false outcome, so I'm wondering if there's a way to determine a third result...rather than IF(logical_test,[value_if_true],[value_if_false]), I'm wondering if a formula can look at a numeric value and if it is above a set tolerance, report "fail", if it is below a certain tolerance, report "pass", and if the value if missing (a blank cell), result in a "data missing" response.

    I suppose this isn't entirely necessary, as I can have conditional formatting detemine three different formats based on the value of one cell, so I can make a cell with missing data shaded red or something, but I was just wondering if I could actually get a different value for the cell. I hope that makes sense.

  5. #5
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by meddington
    "Data Missing" returned when an empty cell occurs...so its more than a question about the "=IF(COUNTIF(D7:D18,"fail"),"fail","pass")" formula being able to determine a third result, and also about the logical function determining a pass/fail to determine a third result as well. A logical test simply determines a true or false outcome, so I'm wondering if there's a way to determine a third result...rather than IF(logical_test,[value_if_true],[value_if_false]), I'm wondering if a formula can look at a numeric value and if it is above a set tolerance, report "fail", if it is below a certain tolerance, report "pass", and if the value if missing (a blank cell), result in a "data missing" response.

    I suppose this isn't entirely necessary, as I can have conditional formatting detemine three different formats based on the value of one cell, so I can make a cell with missing data shaded red or something, but I was just wondering if I could actually get a different value for the cell. I hope that makes sense.
    does this help

    =IF(COUNTBLANK(D7:D18),"Data Missing",IF(COUNTIF(D7:D18,"fail"),"fail","pass"))

  6. #6
    Registered User
    Join Date
    09-06-2005
    Posts
    20
    Yes, that's it exactly. Thanks again!

  7. #7
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by meddington
    Yes, that's it exactly. Thanks again!
    you're welcome. good to see that it helped you.

+ 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