Date Calculator Formula

Jones1413

New Member
Joined
Jul 26, 2019
Messages
47
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am trying to create a formula that calculates the number of years from a specific date to today. I would like for the years of service to populate on the first of the month even if the employee was not hired until later on in a specific month.

For example, today is 4/12/23 and my employee Dan Johnson was hired on 4/18/2002. If I run the formula today(or any day of the month), I would like the formula to calculate he has 21 years of service as long as it is in the same month of his hire date even though he technically would not hit 21 years of service until 4/18/2023.

Date Calculator.xlsx
ABC
1NameHire DateNumber of Years of Service
2Smith, Sam 4/1/1999
3Johnson, Dan 4/18/2002
4Obama, Shelley4/24/2009
5Madden, John 4/9/2012
Sheet1
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
How about
Fluff.xlsm
ABC
1NameHire DateNumber of Years of Service
2Smith, Sam 01/04/199924
3Johnson, Dan 18/04/200221
4Obama, Shelley24/04/200914
5Madden, John 09/04/201211
Dashboard
Cell Formulas
RangeFormula
C2:C5C2=DATEDIF(B2-DAY(B2),TODAY(),"y")
 
Upvote 0
Cell C2: =YEARFRAC(DATE(YEAR(B2),MONTH(B2),1),DATE(YEAR(TODAY()),MONTH(TODAY()),1))
 
Upvote 0

Forum statistics

Threads
1,214,826
Messages
6,121,792
Members
449,048
Latest member
greyangel23

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