Formula to calculate tenure (Years & Months)

janema

Board Regular
Joined
Nov 28, 2022
Messages
117
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2011
  5. 2010
Platform
  1. Windows
  2. Mobile
=DATEDIF(G2,NOW(),”Y”)& ”years", “&DATEDIF(G2,TODAY(),”YM”)& ”months“

I am using the above formula to calculate the tenure date in years and months for people, but it keeps coming back as #NAME? error. G2 in above formula is the date a person started at the organization. I am trying to just calculate between that date and today/current without having to use two separate dates, if that's possible. I tried the "NOW" and "TODAY" but both return that #NAME? error. Any idea what I'm doing wrong here? :(
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Are the cells containing the date data formatted as date? Would you be able to provide a visual of your worksheet?
 
Upvote 0
Are the cells containing the date data formatted as date? Would you be able to provide a visual of your worksheet?

Yes, the date data is formatted as a date. Sure, please see here:

1677018741725.png


and here is the data in G2

1677018780044.png
 
Upvote 0
Try this
Excel Formula:
=YEAR(TODAY())-YEAR(G2) & " Years " & MONTH(G2) - MONTH(TODAY()) & " Months"
 
Upvote 0
Try this
Excel Formula:
=YEAR(TODAY())-YEAR(G2) & " Years " & MONTH(G2) - MONTH(TODAY()) & " Months"
I just realized that will only work if TODAY month is less than DATE month. You may have nest an IF in there to get the larger month.
 
Upvote 0
I just realized that will only work if TODAY month is less than DATE month. You may have nest an IF in there to get the larger month.
Excel Formula:
=YEAR(TODAY())-YEAR(G2) & " Years " & IF(MONTH(TODAY())>MONTH(G2),MONTH(TODAY())-MONTH(G2),MONTH(G2) - MONTH(TODAY())) & " Months"
 
Upvote 0
I might be better off using two dates and having a field with today's date it sounds?
 
Upvote 0
Excel Formula:
=YEAR(TODAY())-YEAR(G2) & " Years " & IF(MONTH(TODAY())>MONTH(G2),MONTH(TODAY())-MONTH(G2),MONTH(G2) - MONTH(TODAY())) & " Months"
That really doesn't work either. Another IF to subtract 1 year if DATE month is greater than TODAY month
 
Upvote 0
=DATEDIF(G2,NOW(),”Y”)& ”years", “&DATEDIF(G2,TODAY(),”YM”)& ”months“

I am using the above formula to calculate the tenure date in years and months for people, but it keeps coming back as #NAME? error. G2 in above formula is the date a person started at the organization. I am trying to just calculate between that date and today/current without having to use two separate dates, if that's possible. I tried the "NOW" and "TODAY" but both return that #NAME? error. Any idea what I'm doing wrong here? :(
I think I have it.
Excel Formula:
=IF(MONTH(TODAY())<MONTH(G2),YEAR(TODAY())-YEAR(G2),YEAR(TODAY())-YEAR(G2))-1&" Years "&MONTH(TODAY())&"Months"
 
Upvote 1
Last one. Promise.
Excel Formula:
=IF(MONTH(TODAY())>MONTH(G2),YEAR(TODAY())-YEAR(G2),YEAR(TODAY())-(YEAR(G2))-1)&" Years "&MONTH(TODAY())&"Months"
 
Upvote 1

Forum statistics

Threads
1,215,069
Messages
6,122,959
Members
449,096
Latest member
Anshu121

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top