Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Calculate years of service

  1. #1
    Board Regular
    Join Date
    Jun 2006
    Posts
    222
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Calculate years of service

    This formula is supposed to calculate difference between today and date hired to give years and months of service. Works fine for all except if the person was hired in year 2000 then this formula shows 110 y. Any one know how to fix this? or have a different formula that works.

    =DATEDIF(E21,TODAY(),"y")&" y "&DATEDIF(E21,TODAY(),"ym")&" m"

    Thanks
    Rick

  2. #2
    MrExcel MVP VoG's Avatar
    Join Date
    Jun 2002
    Location
    127.0.0.1
    Posts
    63,651
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)

    Default Re: Calculate years of service

    That formula works correctly for me. Are you sure that E21 isn't blank?
    HTH, Peter
    Please test any code on a copy of your workbook.

  3. #3
    Board Regular
    Join Date
    Jun 2006
    Posts
    222
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Calculate years of service

    Sorry,
    Found problem, in E21 when looking at date it showed 01/03/00 but when you click on cell in formula bar it showed 01/03/1900. The person's hire date is 01/03/2000 so of course at a glance I thought formula was wrong but it was cell value wrong.

    Thanks for looking.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •