How to Calculate the Tenure for Staff in Months or Years in Excel

For HR assistant or department secretary, calculate the tenure for staff in their company or department is one normal task in their daily work, so acquire the skill of calculating tenure in excel is necessary. This article will provide a simple formula to calculate tenure, the final value can be displayed in months or years depends on your demands.

Prepare a simple table. Suppose some of the list already quit. Some are still working for this company.

Calculate the Tenure 1

Calculate the Tenure for Staff in Months


To calculate the tenure for a staff, we can use DATEDIF function. It is used for returning the Years/Months/Dates between two dates. Please see the general formula for DATEDIF function.

=DATEDIF(start_date,end_date,unit)

Now let’s start to calculate the tenure in months.

Step 1: in C2, enter the formula =DATEDIF(B2,NOW(),”M”). In this formula, B2 is start date, as there is no end date, so we enter NOW() to calculate the months between entry date till now, M is month unit.

Calculate the Tenure 2

Step 2: Click Enter to get result.

Calculate the Tenure 3

Step 3: If there is end date parameter, for example, for ID 01036, leave date is 5/14/2010, we can enter the formula =DATEDIF(B4,C4,”M”) .

Calculate the Tenure 4

Step 4: Click Enter to get result.

Calculate the Tenure 5

Calculate the Tenure for Staff in Years


We just need to change the unit from M to Y.

Step 1: In D2, enter the formula =DATEDIF(B2,NOW(),”Y”). Then click Enter.

Calculate the Tenure 6

Step 2: In D4, enter the formula =DATEDIF(B4,C4,”Y”). Then click Enter.

Calculate the Tenure 7

Calculate the Tenure for Staff in Years and Months


If we want to show the Tenure like XX years and XX months, we need to update the formula. Please be aware that when calculating Months, Years of the dates should be ignored.

Step 1: In D2, enter the formula =DATEDIF(B2,NOW(),”Y”)&” years, “&DATEDIF(B2,NOW(),”YM”)&” months “. Then click Enter. Verify that 25 years and 3 months are displayed.

Calculate the Tenure 8

Step 2: In D4, enter the formula =DATEDIF(B4,C4,”y”)&” years, “&DATEDIF(B4,C4,”ym”)&” months “.

Calculate the Tenure 9

Through above steps, we can find that the tenure is more accurate if we set smaller unit in formula. So, you can calculate tenure by Years and Months, Months and Dates or Years and Dates per your demands accordingly.

Related Functions


  • Excel DATEDIF function
    The Excel DATEDIF function returns the number of days, months, or years between tow dates.The syntax of the DATEDIF function is as below:=DATEDIF (start_date,end_date,unit)…

 

 

Related Posts

If Value is Greater Than A Certain Value
If Value is Greater Than A Certain Value 1

IF function is frequently used in Excel worksheet to return you expect “true value” or “false value” based on the logical test result. If you want to see if a value in one cell is greater than a specific value, ...

If Cell is Not Blank
If Cell is Not Blank 6

IF function is frequently used in Excel worksheet to return you expect “true value” or “false value” based on the result of created logical test. If you want to see if a cell is blank or not, and leave some ...

VBA Macro For VLOOKUP From Another Sheet
vba macro for vlookup from another sheet1

In the previous post, you should know that how to fix or remove the #N/A error when using VLOOKUP formula to lookup value from another sheet. And this post will show you how to use VBA code to vlookup data ...

If Cell is Blank
If Cell is Blank_1

IF function is frequently used in Excel worksheet to return you expect “true value” or “false value” based on the result of created logical test. If you want to see if a cell is blank or not, and leave some ...

If Cell Equals Certain Text String
If cell equals certain text_1

IF function is frequently used in Excel worksheet to return you expect “true value” or “false value” based on the result of created logical test. If you want to see if cell equals a certain text string like “Win”, you ...

If Cell Contains Either Text1 or Text2
If cell contains text1 or text2_1

IF function is frequently used in Excel worksheet to return “true value” or “false value” based on the logical test result. If you want to see if cell contains certain substring1 like “abc” or substring2 like “def”, and returns true ...

If Cell Contains Certain Text OR Equals Certain Text

IF cell equals certain text IF function is frequently used in Excel worksheet to return “true value” or “false value” based on the logical test result. If you want to test values to see if they equal certain text like ...

VLOOKUP From Another Sheet Not Working
vlookup from another sheet not working3

In the previous post, you should know that how to fix or remove the #N/A error when using VLOOKUP formula to lookup value from another sheet. And this post will show you reasons why your VLOOKUP formula is not working ...

If Cell Begins with One of Three Supplied Characters
If Cell Begins with One of Three Supplied Characters

If you want to test values to see if they begin with some given specific characters like “x”, ”y”, or “z”, you can create a formula with COUNTIF and SUM functions to return results. EXAMPLE You can see “TRUE” or ...

Fix #N/A Error For VLOOKUP From Another Sheet
vlookup from anther sheet not working1

This post will show you how to fix the #N/A error why it occurs when you extract values from another sheet using VLOOKUP function in Excel 2016,2013,2010 or other Excel versions. How can you correct a #N/A error in VLOOKUP ...

Sidebar