+ Reply to Thread
Results 1 to 13 of 13

Formula to determine Pass/Fail

  1. #1
    Registered User
    Join Date
    09-20-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    75

    Formula to determine Pass/Fail

    Dear friends,

    I would like to write a simple formula (File as attached).

    IF someone enters a value at the reading column, then we will get a deviation value yes?

    If the deviation falls within the range of the absolute value, then it will be a Pass, otherwise, it will be a Fail.

    Can I know if someone knows how to write the formula?

    Thanks for your help in advance!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,177

    Re: Formula to determine Pass/Fail

    then we will get a deviation value yes?
    how and why?

    For first example:

    Deviation: 0.004, Absolute 0.0005 = Pass ?

    What is significance of "Relative"

  3. #3
    Registered User
    Join Date
    09-20-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    75

    Re: Formula to determine Pass/Fail

    Hi,

    Sorry I think I missed out a few columns in the excel earlier. I have revised the excel sheet by entering the test load column.

    the condition remains the same, let say a value is entered at the reading column and we get a deviation ya? If deviation falls within range of the absolute value,
    then we get a Pass, if not will be a Fail.

    Thanks for your help.
    Attached Files Attached Files
    Last edited by joeyjee; 04-29-2018 at 10:18 AM.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: Formula to determine Pass/Fail

    Try this formula in H5:

    =IF(E5="","Fail",IF(ABS(E5)<=G5,"Pass","Fail"))

    then copy down.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    09-20-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    75

    Re: Formula to determine Pass/Fail

    Thanks Pete, was trying out the =IF(E6<=G6,"Pass","Fail") function and realize that it shows Pass even if the Reading is empty.
    Your formula works! Thanks for the last minutes rescue! Appreciate that!

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Formula to determine Pass/Fail

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Registered User
    Join Date
    09-20-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    75

    Re: Formula to determine Pass/Fail

    Hi there, sure, will do!

  8. #8
    Registered User
    Join Date
    09-20-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    75

    Re: Formula to determine Pass/Fail

    Dear All, I have re-open this thread as I have faced some errors when preparing the excel sheet. I am not sure if I am allow to do so or not, please let me know if it is not allow in the forum.

    Anyway, I notice that the highlighted red one (attached in excel) always show 'fail' even though it is Pass result. And I am unable to troubleshoot to find the root cause.

    Can anyone help to solve this mystery? thanks for your help!!



    Regards
    Joey
    Attached Files Attached Files

  9. #9
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Formula to determine Pass/Fail

    You have a floating point in D4 that introduces an "error". Its floating point value is actually 0.0500000000000007 and not the expected 0.05.

    Try

    =ROUND(IF(ISNUMBER(C4),ABS(C4-B4)," "),2)

    or go a little large than 2 if the precision warrants.
    Dave

  10. #10
    Registered User
    Join Date
    09-20-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    75

    Re: Formula to determine Pass/Fail

    Thanks for your explanation, Guru! This make sense to me.

    But seems like the formula does not work.

    By the way, how can I identify if there is a floating error 0.050000000000007 from the D4?

    Is there a way to determine the error? Or how to look at it?

  11. #11
    Registered User
    Join Date
    09-20-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    75

    Re: Formula to determine Pass/Fail

    Hey Guru, sorry for I have understand you wrongly! The round off should be made at the Deviation cell instead of the Pass/Fail cell.

    it works now! anyway, I am still interested how you know it is due to the floating error? any way to identify?

  12. #12
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Formula to determine Pass/Fail

    if you try =D4=F4
    it will give result as "FALSE", Means D4 and F4 are not equal, so there may be a floating error
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  13. #13
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Formula to determine Pass/Fail

    Quote Originally Posted by joeyjee View Post
    it works now! anyway, I am still interested how you know it is due to the floating error? any way to identify?
    Do what nflsales suggests and to get more specific RE the actual value: With the relevant cell active ... for example D4 ... click in the formula bar and hit the F9 function key. It will show the result of calculation(s) without the "masking" effect of formatting.

    Unfortunately floating point can occur beyond the visible 15 decimals. nflsales' test may return TRUE in those cases, but functions like MATCH, VLOOKUP, HLOOKUP will not find exact matches. They will "see" the difference.

    Floating point is a frequent issue and the only defense is appropriately placed rounding.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Getting Diffuculty with Pass, Fail or Promoted Formula
    By vijubhau in forum Excel General
    Replies: 11
    Last Post: 04-15-2018, 08:53 AM
  2. [SOLVED] Formula for pass,fail,credit(if,and,or)
    By cathal1292 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-02-2016, 06:01 AM
  3. Formula Help with Pass/Fail function
    By bna1219 in forum Excel General
    Replies: 1
    Last Post: 12-10-2014, 09:57 AM
  4. [SOLVED] Need help with formula to return value of Pass or Fail
    By bearligirl89 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-15-2013, 01:06 PM
  5. [SOLVED] Need a formula for pass/fail based on no. of Y answers but automatically fail if 3a is N
    By Researcher1111 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-15-2013, 10:20 PM
  6. Help with Pass / Fail Formula
    By milovisk in forum Excel General
    Replies: 4
    Last Post: 03-20-2012, 02:57 PM
  7. Formula Help with Pass/Fail function
    By Spyroviper in forum Excel General
    Replies: 3
    Last Post: 02-04-2009, 01:02 PM

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