+ Reply to Thread
Results 1 to 4 of 4

if one date falls X number of days after and before one other date

  1. #1
    Registered User
    Join Date
    10-12-2012
    Location
    Altanta Georgia
    MS-Off Ver
    Excel 2007
    Posts
    2

    if one date falls X number of days after and before one other date

    For example, the Date of birth is 02/16/2009, but in order for the person to meet the criteria they had to have had an appointment between 45 days old and 2 years old. So an appointment on 02/17/2011 would not meet criteria just as an appointment on 03/15/2009 would not. An appointment even one day after turning 2 years old would not meet criteria. How do I create a formula in Excel that would give me results of “Meets” or “Does Not Meet” based on the appointment date in relation to birthdate? Like, if appointment date is 05/23/2009 then “Meets”, and if appointment date is 09/23/2011 then “Does Not Meet”.

    I’ve created a formula that uses an “If” statement with a “Datedif” and a ”concatenate” function within it, but it doesn’t seem to work once appointments fall in 2011.

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: if one date falls X number of days after and before one other date

    hi GA2000, welcome to the forum. try this:
    =IF(OR(AND(DATEDIF(A1,B1,"y")=2,DATEDIF(A1,B1,"yd")=0),DATEDIF(A1,B1,"y")=1,AND(DATEDIF(A1,B1,"y")=0,DATEDIF(A1,B1,"yd")>=45)),"Meets","Does Not Meet")

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    10-12-2012
    Location
    Altanta Georgia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: if one date falls X number of days after and before one other date

    Thanks very much! It worked!!!!

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: if one date falls X number of days after and before one other date

    @ GA2000

    Welcome to the forum.

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon 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 those who helped.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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