+ Reply to Thread
Results 1 to 5 of 5

Multiple Criteria for an IF Statement

Hybrid View

  1. #1
    Registered User
    Join Date
    11-22-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    29

    Multiple Criteria for an IF Statement

    Hi there,

    I need some help with the following, please


    Column "D" represents Start Date
    Column "E" represents End Date

    12 months range i.e. 01/08/2011 (Cell S1) & 31/07/2012 (Cell T1)

    I would like formula in Column "R" to show "Yes" if

    the date in D is older than "S1" i.e Cell D10 = "15/07/2011"

    or

    the date in E is newer than "T1" or empty i.e Cell E10="" or "10/08/2012



    Hope this makes sense.


    Appreciate your help.


    PS


    My current formula is not returning any answers

    =IF(OR(AND($D20<$S$1,$E20>$T$1),AND($D20<$S$1,$E20=""),"YES",""))
    Last edited by Markvx; 11-28-2012 at 12:24 PM.

  2. #2
    Valued Forum Contributor Miraun's Avatar
    Join Date
    04-03-2009
    Location
    New England
    MS-Off Ver
    2003, 2007, 2010, 2013
    Posts
    554

    Re: Multiple Criteria for an IF Statement

    =if(or(D10<S10,E10>T10),"Yes","No")

    That should work. Otherwise I'd need an example workbook.
    Going for Guru! Click the Star to the bottom left of this post if I helped!

  3. #3
    Registered User
    Join Date
    11-22-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    29

    Re: Multiple Criteria for an IF Statement

    Many thanks for your quick reply. This works if there is a value (date) in T10 but if T10 is empty, it still shows "No".

    Any other suggestions?

  4. #4
    Valued Forum Contributor Miraun's Avatar
    Join Date
    04-03-2009
    Location
    New England
    MS-Off Ver
    2003, 2007, 2010, 2013
    Posts
    554

    Re: Multiple Criteria for an IF Statement

    Missed some of that info during your edit.

    Your equation reads a bit differently than your requirements.
    OR means one of the two conditions = true, then YES
    AND means both conditions must be true

    Your equation makes it seem that D10 MUST be older than S10, and then either E10 is Newer, or empty.
    If that's the case, the equation should be:
    If(And(D10<S10,OR(E10>T10,Isblank(E10))),"Yes","No"


    However, if any of them can make it true:
    =if(or(D10<S10,E10>T10,Isblank(E10)),"Yes","No")

  5. #5
    Registered User
    Join Date
    11-22-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    29

    Re: Multiple Criteria for an IF Statement

    The latter one is the one I'm after.

    Sorry for not being clear and thank you so much for your help.

    BTW, I love this forum.

+ 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