+ Reply to Thread
Results 1 to 8 of 8

Only return text if several conditions are met

  1. #1
    Forum Contributor
    Join Date
    08-08-2019
    Location
    CO
    MS-Off Ver
    Office 365
    Posts
    106

    Only return text if several conditions are met

    Hey all,

    I've been struggling with this formula for a while now. Hoping someone has a quick answer as to what I am doing wrong. I need the following conditions to return either "Pass", "Fail" or leave blank if a specific cell is blank. I will attach the file and try to explain what I am going for:

    I need cell BM6 to return a "Fail" if cell H17 has an "X", AND if ANY of the following conditions are also met: Cell W37 is less than 5, Cell W42 is less than 1, and Cell W47 is less than 2.
    I need cell BM6 to return a "Pass" if cell H17 has an "X", AND if ALL of the following conditions are also met: Cell W37 is greater than 5, Cell W42 is greater than 1, and Cell W47 is greater than 2.

    Currently, anytime the H17 cell is marked with "X" it returns a pass, and no "X" returns a "Fail". Not exactly what I am going for. Basically I only need it to return pass or fail if H17 has an "X" and the rest of the formula applies.

    The last thing I need from this is if H17 is BLANK, I need BM6 to stay blank. Below is the formula I have, but am attaching the file for clarification. Thank you in advance!

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Only return text if several conditions are met

    Is this what you want?

    =IF(H17="x",IF(OR(C37<5,C42<1,C47<2),"FAIL",IF(OR(C37>5,C42>1,C47>2),"PASS","")),"")

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Only return text if several conditions are met

    Maybe try
    =IF(H17="x",IF(AND(W37>5,W42>1,W47>2),"Pass","Fail"),"")

  4. #4
    Forum Contributor
    Join Date
    08-08-2019
    Location
    CO
    MS-Off Ver
    Office 365
    Posts
    106

    Re: Only return text if several conditions are met

    Perfect, thank you! Much prettier than my sloppy formula!

  5. #5
    Forum Contributor
    Join Date
    08-08-2019
    Location
    CO
    MS-Off Ver
    Office 365
    Posts
    106

    Re: Only return text if several conditions are met

    @Bob Phillips - Actually, I though this did the trick, but if H17 is marked "X" and nothing else has a value, it returns "fail". Can this be modified to return a "Blank" of Only H17 has "X". Basically H17 will stay marked at all times, but the other values will change.
    Last edited by IFSSCref; 01-03-2020 at 04:15 PM.

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

    Re: Only return text if several conditions are met

    Since H17 will stay marked it would seem that the following should be sufficient: =IF(AND(W37="",W42="",W47=""),"",IF(AND(W37>5,W42>1,W47>2),"Pass","Fail"))
    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.

  7. #7
    Forum Contributor
    Join Date
    08-08-2019
    Location
    CO
    MS-Off Ver
    Office 365
    Posts
    106

    Re: Only return text if several conditions are met

    With some modification and trial and error I got it to work with bits a pieces from everyones formula suggestions. Thank you all for your help.

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

    Re: Only return text if several conditions are met

    You're Welcome. Thank You for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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. Return sum of all columns that contain specified text and other conditions
    By bsommerhalder in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-22-2018, 09:30 AM
  2. Nested IF to return text string based on certain conditions
    By Mikeyabosbht in forum Excel General
    Replies: 4
    Last Post: 09-06-2017, 05:36 PM
  3. [SOLVED] Return text string for a variety of different conditions
    By Terry-J in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-25-2014, 03:40 PM
  4. if two conditions are met , can I return a text message in another collumn?
    By tzahranul in forum Outlook Formatting & Functions
    Replies: 4
    Last Post: 06-22-2012, 03:16 AM
  5. Replies: 2
    Last Post: 06-21-2012, 05:12 PM
  6. [SOLVED] Text results with two conditions (lookup with two conditions)
    By Davzx in forum Excel General
    Replies: 8
    Last Post: 05-25-2012, 03:08 AM
  7. Replies: 5
    Last Post: 03-02-2011, 08:56 AM

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