+ Reply to Thread
Results 1 to 9 of 9

Auto Calculate and put a 'x' in OK or Not OK box

  1. #1
    Registered User
    Join Date
    03-07-2016
    Location
    Michigan, USA
    MS-Off Ver
    Office 365
    Posts
    12

    Auto Calculate and put a 'x' in OK or Not OK box

    I have a Sheet we use to fill out and determine if a certain dimension is good from our report. I would like this to automate and figure out if the dimension is within tolerance or not for all rows.

    I would like the formula to place an X in the "OK" box if the result in the J column is between F+G and F-H, Otherwise put an X in the "Not OK" box.
    Example: J9=179.886 F9+G9=179.900 F9-H9 = 179.860 Therefor there should be an X in the OK box (column N) (See attached sheet)
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Auto Calculate and put a 'x' in OK or Not OK box

    I can't open .xlsm files from here, but these should work based on your example:

    In the OK column (N9):
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In the not-OK column:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I've assumed 'greater than or equal to' and 'less than or equal to'. If you don't want the 'equal to' parts, then replace the >= with > and <= with <.

    Hope that helps.
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Auto Calculate and put a 'x' in OK or Not OK box

    try
    =IFERROR(IF(AND(J9>=(F9-H9),J9<=(F9+G9)),"X",""),"")
    and
    =IFERROR(IF(AND(J9>=(F9-H9),J9<=(F9+G9)),"","X"),"")
    Attached Files Attached Files
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Registered User
    Join Date
    03-07-2016
    Location
    Michigan, USA
    MS-Off Ver
    Office 365
    Posts
    12

    Re: Auto Calculate and put a 'x' in OK or Not OK box

    Thank you both for the quick replies!

    Etaf this worked perfectly. Is there a way to include as well a Pass/Fail? Some of these will be automatic Pass or Fail where we will input that word. Can we have the X populate based on that as well?

    I know i can make this work. =IF(J18="Pass","X","") and the Fail be =IF(J18="Fail","X","") But i don't know how to combine these with the last two formulas you helped with.

  5. #5
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Auto Calculate and put a 'x' in OK or Not OK box

    =IFERROR(IF(OR(J9="pass",AND(J9>(F9-H9),J9<(F9+G9))),"X",""),"")
    But how do you want to handle the tolerances ?

    NOT sure of the fail, as the tolerances kick in

    Does Pass/Fail override the tolerance

  6. #6
    Registered User
    Join Date
    03-07-2016
    Location
    Michigan, USA
    MS-Off Ver
    Office 365
    Posts
    12

    Re: Auto Calculate and put a 'x' in OK or Not OK box

    I would like the Pass/fail to override the tolerances. In some cases the tolerances is in a degree of an angle and we know based on the tool we use to cut the feature it will always be within tolerance, unless the tool breaks so it is a automatic pass always. I have tried the suggestion and it seems to work fine until i get to line 18 of the example. For reference i am using:

    =IFERROR(IF(OR($J9="Pass",AND($J9>($F9-$H9),$J9<($F9+$G9))),"X",""),"") in the OK column and
    =IFERROR(IF(OR($J9="Pass",AND($J9>($F9-$H9),$J9<($F9+$G9))),"","X"),"") in the Not OK Column.
    Attached Files Attached Files

  7. #7
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Auto Calculate and put a 'x' in OK or Not OK box

    OK
    =IFERROR(IF(J9="fail","",IF(J9="pass","X",IF(AND(J9>(F9-H9),J9<(F9+G9)),"X",""))),"")

    Not OK
    =IFERROR(IF(J9="pass","",IF(J9="fail","X",IF(AND(J9>(F9-H9),J9<(F9+G9)),"","X"))),"")


    for the NOT OK
    could if just simply say
    if there is an X in the OK then put a blank in NOT OK
    If there is No X in the OK then out an X in NOT OK
    or would there be instances where the OK would be blank and so would the NOT OK
    Last edited by etaf; 06-13-2016 at 01:02 PM.

  8. #8
    Registered User
    Join Date
    03-07-2016
    Location
    Michigan, USA
    MS-Off Ver
    Office 365
    Posts
    12

    Re: Auto Calculate and put a 'x' in OK or Not OK box

    This worked perfectly! You are awesome!

    As for the edit questions there wouldn't be a need for blanks. This report is to be filled out completly. If there are extra rows they will be deleted.

  9. #9
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Auto Calculate and put a 'x' in OK or Not OK box

    Ok
    so in NOT OK

    we could put
    =IF( N9 = "X", "", "X")

    so that does assume that if OK is an X then no matter what NOT OK would be blank
    and if OK is a BLANK then NOT OK would always be an X

+ 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] Auto calculate Age by DOB txt box
    By cardonas in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-02-2016, 03:44 PM
  2. Formula will not auto calculate
    By airedale360 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 03-27-2015, 07:19 PM
  3. Need help to auto calculate and auto fill
    By AndyL3 in forum Excel General
    Replies: 1
    Last Post: 05-19-2011, 02:18 AM
  4. Auto-calculate not working
    By Gary Stainburn in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-27-2011, 01:37 PM
  5. Auto Calculate
    By Smeeg in forum Excel General
    Replies: 7
    Last Post: 11-03-2006, 08:55 AM
  6. [SOLVED] auto calculate not working
    By Noarmom in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 07-27-2006, 10:45 AM
  7. Auto Calculate - Some...
    By Bill Martin -- (Remove NOSPAM from address) in forum Excel General
    Replies: 4
    Last Post: 01-17-2005, 10:06 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