+ Reply to Thread
Results 1 to 12 of 12

Macro PASS or FAIL of Maximum/Minimum for a Nominal

  1. #1
    Registered User
    Join Date
    03-29-2022
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    17

    Macro PASS or FAIL of Maximum/Minimum for a Nominal

    Hello, please help on this.
    1.png

    My report is with
    Nominal ; Maximum ; Minimum ; Result

    I would like to do PASS/FAIL macro according to the Result based on Nominal, Maximum & Minimum.

    Prefer the PASS to be green fill color, while FAIL to be red fill color.
    Attached Images Attached Images

  2. #2
    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,448

    Re: Macro PASS or FAIL of Maximum/Minimum for a Nominal

    What constitutes a pass and a fail???
    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.

  3. #3
    Registered User
    Join Date
    03-29-2022
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    17

    Re: Macro PASS or FAIL of Maximum/Minimum for a Nominal

    Attachment 800059
    Something like this. Example,
    Nominal: 1.5
    Upper & Lower or Maximum & Minimum Limit: +/-0.5
    Result: 0.9 (< would like excel to do this for me, PASS or FAIL)
    Last edited by AliGW; 10-11-2022 at 05:25 AM. Reason: Please DON'T quote unnecessarily!

  4. #4
    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,448

    Re: Macro PASS or FAIL of Maximum/Minimum for a Nominal

    Yes, but how does Excel know whether 0.9 ias a pass or a fail? You haven't even told me what it is.

  5. #5
    Registered User
    Join Date
    03-29-2022
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    17

    Re: Macro PASS or FAIL of Maximum/Minimum for a Nominal

    It's fail.

    Nominal: 1.5 +/-0.5
    Upper Limit: 2.0
    Lower Limit: 1.0

    Fail if the result is under 1.0 or over 2.0+
    Pass if the result is between 1.0 ~ 2.0

    This is just an example. So, would like see a macro where it can show me pass/fail of the result with nominal+upper+lower limit...
    Last edited by AliGW; 10-11-2022 at 05:33 AM. Reason: Please DON'T quote unnecessarily!

  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,448

    Re: Macro PASS or FAIL of Maximum/Minimum for a Nominal

    WHY is it a FAIL? What's the calculation??? No idea how you are manipulating the figures to arrive at PASS or FAIL - you still have not defined what constitutes each.

    Life's too short - I'm out, sorry.

  7. #7
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    365 32bit Win
    Posts
    1,909

    Re: Macro PASS or FAIL of Maximum/Minimum for a Nominal

    Isn't the Pass/Fail just a formula like this?
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    with some conditional formatting?

  8. #8
    Registered User
    Join Date
    03-29-2022
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    17

    Macro PASS or FAIL of Maximum/Minimum for a Nominal

    Nominal: 3.708 (+0.055 / -0)
    Result: 3.736
    It should be PASS Result.
    Why it shows FAIL instead?

    Attachment 800234

    Even I add in '+0.05 & '-0, still the same issue.
    Attachment 800235


    Please help on this, thanks.
    Attached Images Attached Images

  9. #9
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Upper & Lower Limit error

    D2-G2 = 3.708-3.736= -0.028 which is <F2 (value 0), thus the AND function returns FALSE thus " FAIL"

  10. #10
    Registered User
    Join Date
    03-29-2022
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    17

    Re: Upper & Lower Limit error

    Quote Originally Posted by Pepe Le Mokko View Post
    D2-G2 = 3.708-3.736= -0.028 which is <F2 (value 0), thus the AND function returns FALSE thus " FAIL"
    Is there any other function code to correct for this?
    Attachment 800238

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

    Re: Macro PASS or FAIL of Maximum/Minimum for a Nominal

    @Linuxya

    TWO forum rules broken in quick succession: please read the forum rules BEFORE posting here again.

  12. #12
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Macro PASS or FAIL of Maximum/Minimum for a Nominal

    Quote Originally Posted by AliGW View Post
    @Linuxya

    TWO forum rules broken in quick succession: please read the forum rules BEFORE posting here again.
    @Linuxya Good luck with your query

+ 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. Pass Fail or N/A
    By wilsonjr1986 in forum Excel General
    Replies: 3
    Last Post: 10-19-2021, 01:29 PM
  2. Macro to Give Total weight within a limit (maximum & minimum)
    By Darshan Shah in forum Excel Programming / VBA / Macros
    Replies: 33
    Last Post: 10-17-2020, 10:29 AM
  3. [SOLVED] if value is more than . . . Pass otherwise Fail
    By Stona in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-15-2020, 10:09 AM
  4. Quick help with creating a macro for determining Pass or Fail of a set of scores
    By alanjackson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-02-2018, 11:44 AM
  5. Pass or fail?
    By anri.scooter in forum Excel General
    Replies: 4
    Last Post: 07-21-2015, 03:38 AM
  6. [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
  7. [SOLVED] Macro for test result Count as pass, fail and incomplete.
    By Amar in forum Excel General
    Replies: 1
    Last Post: 06-10-2005, 08:05 AM

Tags for this Thread

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