+ Reply to Thread
Results 1 to 5 of 5

Nested Ifs, 3 ANDS condition

  1. #1
    Valued Forum Contributor
    Join Date
    10-21-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    513

    Nested Ifs, 3 ANDS condition

    Hi,

    I have this logical condition set up, but it's partially working and I dont' know how to get around it.

    =IF(H4="y",IF(J4="y",IF(L4="y",IF(ISTEXT(Q4),"Yes","No"))))

    It's testing 4 fields. What I want is.....if all 3 fields are "y" AND the Q4 has text in the cell, then I want this formula to return "Yes". Otherwise, return "No".

    When I run this formula, it seems that it's only looking at the last if and ignoring the previous 3 fields.

    For example....if I change H4 to "n", the formula would return "False" instead of "No". If I delete Q4 cell value, formula does return "No".

    Can anyone point in the right direction please?

    Thank you

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Nested Ifs, 3 ANDS condition

    Lifeseeker,

    Try using the AND() function:
    =IF(AND(H4="y",J4="y",L4="y",ISTEXT(Q4)),"Yes","No")
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Nested Ifs, 3 ANDS condition

    One way,

    Please Login or Register  to view this content.
    Regards
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: Nested Ifs, 3 ANDS condition

    Please Login or Register  to view this content.
    If your question has been satisfactorily addressed, please consider marking it solved. Click the Thread Tools dropdown and select Mark thread as solved.
    Also, you might want to add to the user's reputation by clicking the star icon in the lower left corner of the post with the answer- it's why we do what we do...

    Thomas Lafferty
    Analyst/Programmer

  5. #5
    Valued Forum Contributor
    Join Date
    10-21-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    513

    Re: Nested Ifs, 3 ANDS condition

    Quote Originally Posted by tlafferty View Post
    Please Login or Register  to view this content.
    ah yes, I actually tested it out by myself as well and I was going to delete the post...lol

    =IF(AND(H4="y",J4="y",L4="y",ISTEXT(Q4)), "Yes", "No")

    Thank you all

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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