+ Reply to Thread
Results 1 to 7 of 7

Dates in Formulas

  1. #1
    Forum Contributor
    Join Date
    11-06-2007
    Posts
    123

    Dates in Formulas

    Hi

    I am trying to identify milestone anniversaries of 1,5,10,15,20,25,30,35,40 and over 40 from the date an employee joined the Company but only between the dates of 1st July 2009 to 30th June 2010. It's the split year part that I am having trouble with.

    Thanks

    Regards

    C
    Last edited by Cortlyn; 11-19-2009 at 06:56 AM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Dates in Formulas

    Hi,

    With July 1st 2009 in A1 and 3o June 2010 in B1, and 1,5,10,15 etc.. in B2, C2, D2...etc. and joining dates in column A starting in A3. In B3 enter:

    Please Login or Register  to view this content.
    and copy across and down.

    You could then analyse the resulting table with a Pivot Table and filter the Yes values

    HTH
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    11-06-2007
    Posts
    123

    Re: Dates in Formulas

    Hi Richard

    Thanks for your help but I think that I am not following you instructions correctly, please see attached file.

    Thanks

    Cortlyn
    Attached Files Attached Files

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Dates in Formulas

    I think Richard simply mistyped a couple of references (ie not absolute).

    His formula revised re: absolutes would be:

    Please Login or Register  to view this content.
    For your >40 column perhaps first

    Please Login or Register  to view this content.
    Followed up with

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    11-06-2007
    Posts
    123

    Re: Dates in Formulas

    Thank you Richard and DonkeyOte. It works!
    Kind regards
    Cortlyn

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

    Re: Dates in Formulas

    Here's a slightly different approach, assuming that you always want to search in a 1 year period.

    With hire dates in A2 down, put the year end date in F1 (in your case 30th June 2010) and the list of significant anniversaries in H2:H20 (one per cell, e.g. 1,5,10,15,20,25 etc.)

    Then in B2 copied down to show anniversary (if there is one)

    =IF(A2>F$1,"",IF(COUNTIF(H$2:H$20,DATEDIF(A2,F$1,"y")),DATEDIF(A2,F$1,"y"),""))

    and in C2 copied down to show the date of that anniversary

    =IF(B2="","",DATE(YEAR(A2)+B2,MONTH(A2),DAY(A2)))

    See attached - I generated some random dates in column A, press F9 to re-generate
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    11-06-2007
    Posts
    123

    Re: Dates in Formulas

    Thank you Daddylonglegs

    That gives it all in one column and makes it easier for me to count and Pivot.

    Regards

    Cortlyn

+ 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