+ Reply to Thread
Results 1 to 5 of 5

Increment Dates by 6 months until result falls in between two date values and return resul

  1. #1
    Registered User
    Join Date
    05-24-2013
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    26

    Increment Dates by 6 months until result falls in between two date values and return resul

    Hello again my friends,

    It's off to another project after you all got me through the last one. Thanks to all who assisted. The task in front of me seems like it's easy enough, however, I think I'm either just not seeing the solution, or have not gotten into the required functions deep enough. I have a date of an event in the past (a couple of weeks to several years) and would like to return a 6 month multiple of that date once it reaches set criteria (halves of the current year). If the event happened on 3/12/09, then the desired result would be 3/12/13 (First half of this year) and 9/12/13 (Second half of this year). If the event happened 4/1/13, then the desired result would be blank for first half of this year (not having reached the 6 month increment) and 10/1/13 for the second half of this year. There is no need to list every multiple of the date, just the ones that meets the criteria.

    I would upload a sample worksheet, but at the moment it contains just the 3 dates (event date, start of current year, and end of current year). I have tried to clarify what I am trying to get excel to do and Google has been of little help. So I turn to a more specialized option.

    Thank you all for your assistance,

    Scott
    Last edited by sdavison; 06-28-2013 at 09:10 AM.

  2. #2
    Forum Contributor
    Join Date
    08-02-2012
    Location
    Pune
    MS-Off Ver
    Office 365 (Win 10)
    Posts
    489

    Re: Increment Dates by 6 months until result falls in between two date values and return r

    Hi,
    I am not able to fully understand the criteria since I am in hurry now,
    have a look at the below formula
    PHP Code: 
    =EDATE(A1,6
    Please make the Post as solved, when you get your answer & Click * if you like my suggestion

  3. #3
    Registered User
    Join Date
    05-24-2013
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Increment Dates by 6 months until result falls in between two date values and return r

    Thanks for the quick reply.

    I am on the track of using edate, however, I need to run that formula several times until the current year is reached. Nesting edate formulas is possible, but have to be changed manually in every instance. I wonder if the =DATE function can be manipulated to play with month,day and year equations. I have to believe there is a formula or function which says add 6 months to this date until it is greater than target date.

    Scott

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Increment Dates by 6 months until result falls in between two date values and return r

    Assuming you have the event date in A2 and the start of the current year in B2 - you can either just type that in or make it dynamic by using this formula

    =DATE(YEAR(TODAY()),1,1)

    Then in D2 use this formula for the date in the first half of the year

    =LOOKUP(10^9,IF({1,0},0,EDATE(A2,FLOOR(DATEDIF(A2,B2-1,"m"),6)+6)))

    custom format that cell as d/m/yy;; [the two semi-colons ensure that it shows as blank if there is no valid date]

    and for E2 use this version:

    =LOOKUP(10^9,IF({1,0},0,EDATE(A2,FLOOR(DATEDIF(A2-1,EDATE(B2-1,6),"m"),6)+6)))

    formatted the same way
    Audere est facere

  5. #5
    Registered User
    Join Date
    05-24-2013
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Increment Dates by 6 months until result falls in between two date values and return r

    Once again, the forum members come thru!

    I Can't begin to say how thankful I am for those who are willing to teach. Now, I knew it was possible, but had no idea it was so involved. I now have to it the educational sites and learn why the formula works. I knew the EDATE and Lookup functions, but had never even heard of floor and datedif. My only hope is one day to learn enough that I may be able to repay the favor and start answering questions instead of just asking them!

    Thanks Again,

    Scott

+ 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