+ Reply to Thread
Results 1 to 14 of 14

logical function problem

  1. #1
    Registered User
    Join Date
    09-06-2005
    Posts
    20

    logical function problem

    Question in two parts. I currently have a spreadsheet calculating pass/fail based on a defined tolerance...for example:

    value Pass/Fail Tolerances (dEab)

    0.23 Pass 2
    0.18 Pass 1
    0.30 Pass 2

    I'd like to reformat this to one row, like this:

    value Pass/Fail Tolerances (dEab)
    0.23, 0.18, 0.30 Pass 2, 1, 2

    The problem I'm having is the pass/fail cell. Instead of a logical funtion based on two cell values (=IF(A1<=C1,"Pass","Fail") it would be have to be based on the different values in cell A1 and C1. I couldn't wrap my head around this, so I decided to keep the original format, and simply create a summary report formated in one row where the value column would look like this:

    =TEXT(C24,"0.00")&", "&TEXT(C25,"0.00")&", "&TEXT(C26,"0.00")

    And the pass/fail column would look like this...sort of a multiple logical function:

    =IF(C24<=E24,"Pass","Fail")=IF(C25<=E25,"Pass","Fail")=IF(C26<=E26,"Pass","Fail")

    my logical function reports "False" and I know I'm totally missing something here. Any advice?

    Next issue is I'll have a long column of pass/fail values. I'd like to do a summary here displaying "Pass" if all values of the column are reporting "Pass" and a "Fail" if any cell reports a "Fail". This is probably the easier of the two issues I'm having, but if anyone can help it would be appreciated.

    thanks

  2. #2
    Registered User
    Join Date
    09-06-2005
    Posts
    20
    ok, I figured out the first part of my question. My logical function should look more like this:

    =IF(AND(C24<=E24,C25<=E25,C26<=E26),"Pass","Fail")

    but if anyone can answer the second part of my question...I still haven't figured that out.

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

    Lightbulb

    Quote Originally Posted by meddington
    Question in two parts. I currently have a spreadsheet calculating pass/fail based on a defined tolerance...for example:

    value Pass/Fail Tolerances (dEab)

    0.23 Pass 2
    0.18 Pass 1
    0.30 Pass 2

    I'd like to reformat this to one row, like this:

    value Pass/Fail Tolerances (dEab)
    0.23, 0.18, 0.30 Pass 2, 1, 2

    The problem I'm having is the pass/fail cell. Instead of a logical funtion based on two cell values (=IF(A1<=C1,"Pass","Fail") it would be have to be based on the different values in cell A1 and C1. I couldn't wrap my head around this, so I decided to keep the original format, and simply create a summary report formated in one row where the value column would look like this:

    =TEXT(C24,"0.00")&", "&TEXT(C25,"0.00")&", "&TEXT(C26,"0.00")

    And the pass/fail column would look like this...sort of a multiple logical function:

    =IF(C24<=E24,"Pass","Fail")=IF(C25<=E25,"Pass","Fail")=IF(C26<=E26,"Pass","Fail")

    my logical function reports "False" and I know I'm totally missing something here. Any advice?

    Next issue is I'll have a long column of pass/fail values. I'd like to do a summary here displaying "Pass" if all values of the column are reporting "Pass" and a "Fail" if any cell reports a "Fail". This is probably the easier of the two issues I'm having, but if anyone can help it would be appreciated.

    thanks
    please attach a sample file in zip format.

  4. #4
    Registered User
    Join Date
    09-06-2005
    Posts
    20
    Here's the attachment regarding the second part of my question... generating a summary of a column of pass/fail results.
    Attached Files Attached Files

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

    Lightbulb

    Quote Originally Posted by meddington
    Here's the attachment regarding the second part of my question... generating a summary of a column of pass/fail results.
    try this

    =IF(COUNTA(D7:D18)=COUNTIF(D7:D18,"Pass"),"Pass","Fail")

  6. #6
    Registered User
    Join Date
    09-06-2005
    Posts
    20
    Perfect. Thanks!

  7. #7
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    more consice

    Please Login or Register  to view this content.

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

    Lightbulb

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

  9. #9
    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?

  10. #10
    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???

  11. #11
    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.

  12. #12
    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"))

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

  14. #14
    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