+ Reply to Thread
Results 1 to 8 of 8

If Multiple Cells Are Between Two Values Then...

  1. #1
    Registered User
    Join Date
    04-14-2020
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    6

    If Multiple Cells Are Between Two Values Then...

    Hello again everyone! I'm trying to create a formula that will scan a row of cells (A2:S2) and give a "Pass"/"Fail" condition if each cell is between two numbers on another tab. It also needs to ignore error (#N/A) cells and only count the cells with numbers in them.

    So basically something like this...only working instead of doing nothing:

    IF(AND(A2:S2<=Tol!B4,A2:S2>=Tol!C4),"Pass","Fail"))

  2. #2
    Registered User
    Join Date
    03-22-2020
    Location
    Malaysia
    MS-Off Ver
    2013 and 365 Pro Plus
    Posts
    56

    Re: If Multiple Cells Are Between Two Values Then...

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    or

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Someone with better solution will come.
    Last edited by biex; 04-15-2020 at 09:37 PM.

  3. #3
    Registered User
    Join Date
    04-14-2020
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: If Multiple Cells Are Between Two Values Then...

    Hmm, the second one gives a "Pass" no matter what. The first formula only works if a single cell is out of tolerance. If multiple cells are failing, it states "Pass".

    Edit: Actually, the first formula works if all the cells are above the maximum tolerance, but it states "Pass" if some cells are below the minimum and some are above the maximum.
    Last edited by Shemhamph; 04-15-2020 at 10:38 PM.

  4. #4
    Registered User
    Join Date
    03-22-2020
    Location
    Malaysia
    MS-Off Ver
    2013 and 365 Pro Plus
    Posts
    56

    Re: If Multiple Cells Are Between Two Values Then...

    it actually hard for me or someone else to work on something without actually see any sample file... maybe you could provide us with some sample file
    Last edited by AliGW; 04-16-2020 at 12:47 AM. Reason: Please don’t quote unnecessarily!

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

    Re: If Multiple Cells Are Between Two Values Then...

    See the yellow banner please

  6. #6
    Registered User
    Join Date
    04-14-2020
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: If Multiple Cells Are Between Two Values Then...

    Okay, I've attached a sample of similar data. Thanks for the help!
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    04-14-2020
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: If Multiple Cells Are Between Two Values Then...

    I just realized I messed up the formula in that sample...it's supposed to be looking at row 2 not 3. Also, it needs to work if there's an upper tolerance as well (currently it shows 90-NA because there isn't one on that particular sample, but on others there are).
    Last edited by Shemhamph; 04-17-2020 at 12:05 AM.

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,648

    Re: If Multiple Cells Are Between Two Values Then...

    Try the following in cell V1: =IF(SUM(COUNTIF(A2:S2,NA()),COUNTIFS(A2:S2,">="&Tol!B4,A2:S2,"<="&Tol!C4))=19,"Pass","Fail")
    If this doesn't work then it may help us if you'll provide more examples of when the cell should read Pass and of when it should read Fail. Include examples where there is and isn't an upper and/or lower (if applicable) tolerance.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to 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. [SOLVED] Show Multiple Values in Multiple Cells IF Values in Column 'I' =>1
    By markrc139 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-27-2019, 12:12 PM
  2. Replies: 13
    Last Post: 05-24-2018, 01:18 AM
  3. Replies: 8
    Last Post: 10-03-2017, 03:10 PM
  4. Replies: 2
    Last Post: 05-26-2015, 07:29 PM
  5. Sum values from multiple cells - multiple lookup values in single cell
    By taxdept in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-21-2012, 04:12 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