+ Reply to Thread
Results 1 to 8 of 8

IF AND THEN Formula

  1. #1
    Forum Contributor
    Join Date
    01-15-2008
    Posts
    140

    IF AND THEN Formula

    I am trying to get the correct formula for the following:

    IF A7 is "no" AND B7 is between 100 and 150, AND C7 is "xx", THEN IF A8 is "yes" AND B8 is between 100 and 150, AND D8 is "xx", THEN E8 ="xx", AND IF A8 is "yes" AND B8 is between 100 and 150, AND D8 is "yy", THEN E8 = "yy"

    Column A will always be either "no" or "yes" Column B will only have a number in it but that number may be lower than 100 and can even be a negative number or higher than 150. Column C will always be either "xx" or "yy" Column D will always be either "xx" or "yy" Finally if Column E does not = either "xx" or "yy" then it remains blank.

  2. #2
    Forum Contributor
    Join Date
    08-07-2015
    Location
    AB, Canada
    MS-Off Ver
    Excel 2013 x64
    Posts
    132

    Re: IF AND THEN Formula

    You're missing a few cases in your example. You haven't described what you'd like the output to be if your first set of AND statements is false, or if your first set is true and your second set is false.

    In my formula below, I've added text for those two cases so you can replace that text with whatever you think should be the output in those scenarios.
    Please Login or Register  to view this content.
    Hope that helps!

  3. #3
    Forum Contributor
    Join Date
    01-15-2008
    Posts
    140

    Re: IF AND THEN Formula

    I have not tested your solution yet. I wanted to first see I can clarify your request regarding the missing cases. If the first set of AND statements is false then it does not even look at Row 8. IF the first set of AND statements is TRUE but any one of A8, B8, or D8 is FALSE then it looks no further, and E8 remains blank. Sorry for not clarifying this part.

    Base on this further clarification, would you still suggest the same formula?

  4. #4
    Forum Contributor
    Join Date
    08-07-2015
    Location
    AB, Canada
    MS-Off Ver
    Excel 2013 x64
    Posts
    132

    Re: IF AND THEN Formula

    I suggest trying the provided formula with your data.

    The part that confuses me is that this formula will never return anything except "yy" or blank. Based on your explanation I would expect a desired result of "xx" in some cases.

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    01-15-2008
    Posts
    140

    Re: IF AND THEN Formula

    Does not this part of my original request make for E8 to possibly be "xx"

    THEN IF A8 is "yes" AND B8 is between 100 and 150, AND D8 is "xx", THEN E8 ="xx"

  6. #6
    Forum Contributor
    Join Date
    08-07-2015
    Location
    AB, Canada
    MS-Off Ver
    Excel 2013 x64
    Posts
    132

    Re: IF AND THEN Formula

    There we go! I knew I was missing some information. Try the following formula.

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    01-15-2008
    Posts
    140

    Re: IF AND THEN Formula

    Thanks, Definitely appears to be working. This will be a nice time saver. Will mark as solved and add to rep.

  8. #8
    Forum Contributor
    Join Date
    08-07-2015
    Location
    AB, Canada
    MS-Off Ver
    Excel 2013 x64
    Posts
    132

    Re: IF AND THEN Formula

    Thanks!

    Glad to help.

+ 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. Replies: 11
    Last Post: 06-06-2014, 03:34 PM
  2. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04: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