Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Calculating Months of Tenure.
Written by Allen Wyatt (last updated December 22, 2023)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365
If you are in charge of tracking employees in your department or company, you might want to know if you can use Excel to calculate the months of tenure for those employees, given the date at which the employee started. This can be done very easily.
For the sake of this example, let's assume that column C contains the starting date for a list of employees. You could use the following formula in column D to determine each employee's tenure:
=DATEDIF(C3,NOW(),"M")
The DATEDIF function calculates the difference between a starting date and an ending date. The "M" used in the formula indicates that you want the result in completed months.
To calculate the average tenure for your series of employees, simply include the following formula at the bottom of column C:
=AVERAGE(C3:C174)
Of course, you should replace the range in the function (C3:C174) with the actual range of employee tenures as determined by the DATEDIF formula.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9605) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Calculating Months of Tenure.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
If you import information generated on a UNIX system, you may need to figure out how to change the date/time stamps to ...
Discover MoreYou can use Excel to work with times and dates. Sometimes, however, figuring out the best way to do that can be tricky. ...
Discover MoreIf your company closes out its accounting months at the end of each calendar quarter, figuring out the proper closing ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2019-09-10 19:35:46
Peter Atherton
Dave
The DATEDIF function is an old Lotus 123 function that Excel can use but there has never, I think, been any help on this function. However there is a very good page on this site, see:
https://excelribbon.tips.net/T011360_Elapsed_Days_as_Years_Months_and_Days.html The DATEDIF returns a string that is very easy to understand.
Excel's version is the YEARFRACT function. This reurn the difference as a decimal fraction and has the advantage that it is easy to do further calculations on the result. If you want to use it then check the help page as there are five options on calculating the result, so choosing the right basis is crucial to getting the answer you want.
2019-09-09 14:31:49
Dave Bonin
Oddly, there is no Excel Help for the DATEDIF() function. I wonder why. Is the function no longer supported or is it in an add-in?
Personally, if the calculation is not too critical, I tend to subtract the newer date from the older and then divide by 30.4. This gets me close enough for most purposes. It also works nicely for providing results in decimal months when the number of months is not exactly an integer.
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments