+ Reply to Thread
Results 1 to 8 of 8

IF/AND statement not working

  1. #1
    Registered User
    Join Date
    03-31-2021
    Location
    Staffordshire
    MS-Off Ver
    365
    Posts
    14

    IF/AND statement not working

    Hi, I can't get my formula to work, please open the attachment.
    The formulas are in D3:D6.
    I would expect D3 to be "No", D4 and D5 to be "No" and D6 to be "Yes"

    Where am I going wrong? I feel like I have covered all scenarios and that the required conditions are being met

    Many thanks

    Drum
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,414

    Re: IF/AND statement not working

    The three last dates are all bigger than today, soo ...

    This may be what you mean:

    =IF(A3>TODAY(),"n/a",IF(AND(B3="Yes",C3<=A3),"Yes",IF(AND(B3="Yes",C3>A3),"No",IF(B3="No","No",""))))
    Last edited by AliGW; 09-15-2022 at 11:52 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,552

    Re: IF/AND statement not working

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


    Note that your dates are 2023 hence n/a outcomes.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    03-31-2021
    Location
    Staffordshire
    MS-Off Ver
    365
    Posts
    14

    Re: IF/AND statement not working

    Quote Originally Posted by AliGW View Post
    The three last dates are all bigger than today, soo ...

    This may be what you mean:

    =IF(A3>TODAY(),"n/a",IF(AND(B3="Yes",C3<=A3),"Yes",IF(AND(B3="Yes",C3>A3),"No",IF(B3="No","No",""))))
    Genius. Thanks ALIGW

  5. #5
    Registered User
    Join Date
    03-31-2021
    Location
    Staffordshire
    MS-Off Ver
    365
    Posts
    14

    Re: IF/AND statement not working

    Thank you, I missed this!

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,414

    Re: IF/AND statement not working

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  7. #7
    Registered User
    Join Date
    03-31-2021
    Location
    Staffordshire
    MS-Off Ver
    365
    Posts
    14

    Re: IF/AND statement not working

    Thank you, I have done that to both of your replies

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,552

    Re: IF/AND statement not working

    You're welcome. Thanks for the rep.

+ 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] If statement not working
    By hendrikbez in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-14-2019, 06:41 AM
  2. [SOLVED] If statement on working out percentage and based on time and date not working.
    By Johnny247 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-11-2019, 06:07 PM
  3. multiple if statement not working but not working (make sense!)
    By vanessafvg in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-17-2018, 12:06 AM
  4. SUM IF statement not working
    By Aly1978 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-19-2017, 11:52 PM
  5. If Then Statement Not Working
    By MMCHouston in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-27-2015, 03:48 PM
  6. Working While Statement Stops Working
    By Verbaruab in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-10-2011, 05:58 PM
  7. AND statement not working
    By Ada01 in forum Excel General
    Replies: 3
    Last Post: 11-05-2009, 06:03 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