+ Reply to Thread
Results 1 to 9 of 9

How many years from start date formula

  1. #1
    Registered User
    Join Date
    01-08-2018
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    14

    How many years from start date formula

    Hello

    I have a list of start dates for employees and I would like to put a formula in that calculates how many years they have worked for the company from this date. I would have thought this was simple to do but from an online search I can't seem to find a clear answer.

    Thanks in advance.

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: How many years from start date formula

    use DATEDIF(startdate,enddate,"Y")


    datedif isnt like other normal formulas, excel wont help you try fill in the arguments
    here is some reading on it
    https://exceljet.net/excel-functions...tedif-function
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    01-08-2018
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    14

    Re: How many years from start date formula

    Thanks for replying

    I don't seem to have that formula when I press =? I only have DATE and DATEVALUE?

    I have attached an example of what I have done so far. What I am trying to do is summarise the data before putting it into a table but as you can see I'm having a bit of trouble.

    When an employee has worked less than a year its not sure what range to put it in. How can I get round this? I think I may need to put some dates in months?
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,913

    Re: How many years from start date formula

    Try this:

    in B3: =DATEDIF(A3,TODAY(),"Y")

    in C3: =LOOKUP(B3,{0,1,2,3,5},{"< 1 Year","1-2 Years","2-3 Years","3-5 Years","> 5 Years"})

  5. #5
    Registered User
    Join Date
    01-08-2018
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    14

    Re: How many years from start date formula

    How do I get the 'DATEDIF'?

    When I press = I only have two options, DATE and DATEVALUE?

  6. #6
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: How many years from start date formula

    The DATEDIF formula is a bit of a special story.. it is officially not supported in excel and therefor not in the list of formula's (I believe there were lawsuits against MS for copyright infringements)
    it is however available in the background but you will have to know (or find on internet) how to use it as the normal help to setup the formula is not available

    It is the right formula to use however..
    I also put a small lookup table for the year ranges that is easier then nested if formula's

    Edit: I see humdingaling in post #2 also posted a link, that link has a clear list of available options, make sure to check that is you also want months or days sincs start
    Attached Files Attached Files
    Last edited by Roel Jongman; 04-26-2018 at 04:16 AM.

  7. #7
    Registered User
    Join Date
    01-08-2018
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    14

    Re: How many years from start date formula

    How do I get it from the 'background'? Seems silly that it doesn't show up!

  8. #8
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: How many years from start date formula

    just type the formula manualy, all that is missing is the normal formula wizard guiding you thru what to put where. but you were given 2 links that explain in detail how the formula should be setup and the working formula is also in your example workbook
    understanding how it works is now up to you..

    Like i said it is a bit of a special story behind this formula.. (legal stuff) so it is just a little more difficult to use if you are used to using the formula wizard.
    just read thru one of the links provided (I think humdingaling in post #2 is easier to understand) and see all possibilities of the DATEDIF formula and to see which date goes where in the formula

  9. #9
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: How many years from start date formula

    Quote Originally Posted by Rumpus24 View Post
    How do I get the 'DATEDIF'?

    When I press = I only have two options, DATE and DATEVALUE?
    Date-Dif, This function doesn't exist as other function but mystically it works. You will have to put =DATEDIF(STARTDATE, ENDDATE,Option)

    An option can be as below.

    "Y" Difference in complete years
    "M" Difference in complete months
    "D" Difference in days
    "MD" Difference in days, ignoring months and years
    "YM" Difference in months, ignoring days and years
    "YD" Difference in days, ignoring years
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Split Start End date into multiple years
    By tos in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-25-2016, 06:42 AM
  2. [SOLVED] Help in writing formula in excel to produce dates based on start date and end date
    By shoot for moon in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-10-2014, 01:00 PM
  3. How to spread annual forecasts by month across fiscal years by variable start date
    By gbolanis in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-21-2013, 11:59 AM
  4. [SOLVED] How to determine how many fiscal years are present from start date to end date.
    By terrivega3500 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-07-2012, 01:25 PM
  5. defining a years length(start and end dates)
    By wheefus in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-13-2008, 11:44 AM
  6. [SOLVED] Start Date minus (Years + Months + Days) = ?
    By quartz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-11-2006, 01:10 PM
  7. [SOLVED] Date Formula - in Years
    By Jenny Potter in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-20-2006, 05:30 AM

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