+ Reply to Thread
Results 1 to 3 of 3

10 years after certain period, or not

Hybrid View

  1. #1
    Registered User
    Join Date
    10-31-2006
    Posts
    27

    10 years after certain period, or not

    Hi,

    I have the following question: I'm looking for some way to determine whether a certain date falls at least 10 years (and/or 15 years, 25 year, 50 years etc.) after a certain period.

    To make it more clear, I have the date of an event (f.e. 24-04-1995), and I have a period during which someone was alive (f.e. 03-02-1920 - 15-06-1859). Now I want to know whether that event has taken place more than x years after the person died.

    I have already used the following formula to determine whether the date fell within the living period:

    =IF(AND(D2>=DATEVALUE(LEFT(C2;FIND(" - ";C2)));D2<=DATEVALUE(RIGHT(C2;LEN(C2)-FIND(" - ";C2)-2)));1;"0")

    But now I want to know whether it falls a certain number of years behind the period. Can anyone help me?

    Thanks!

    Regards,
    Edward

  2. #2
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    Edward,

    Try,

    =DATEDIF(DATEVALUE(LEFT(A2,10)),C2,"y")<10

    This assumes the person's date of death is always the 10 leftmost characters in the text string in A2, C2 is the date you are testing. Change the <10 as needed.

    HTH

    Steve

  3. #3
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Quote Originally Posted by EHS
    Hi,

    I have the following question: I'm looking for some way to determine whether a certain date falls at least 10 years (and/or 15 years, 25 year, 50 years etc.) after a certain period.

    To make it more clear, I have the date of an event (f.e. 24-04-1995), and I have a period during which someone was alive (f.e. 03-02-1920 - 15-06-1859). Now I want to know whether that event has taken place more than x years after the person died.

    I have already used the following formula to determine whether the date fell within the living period:

    =IF(AND(D2>=DATEVALUE(LEFT(C2;FIND(" - ";C2)));D2<=DATEVALUE(RIGHT(C2;LEN(C2)-FIND(" - ";C2)-2)));1;"0")

    But now I want to know whether it falls a certain number of years behind the period. Can anyone help me?

    Thanks!

    Regards,
    Edward
    Hi Edward,

    Have a look at this link for dates before 1900

    http://j-walk.com/ss/excel/usertips/tip028.htm
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

+ 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