- In a new column, enter the hire date for each employee.
- In the next column, enter the following formula: =DATEDIF(B2,TODAY(),"y")&" years"
- Replace "B2" with the cell reference of the hire date for the first employee.
- The formula will calculate the number of years between the hire date and today's date, and display the result with the word "years" added at the end.
- Copy the formula down to the rest of the rows to calculate the years of service for each employee.
Note: The
DATEDIF function calculates the difference between two dates in years, months, or days. The "y" argument in the formula tells the function to calculate the difference in years. The "&" symbol is used to concatenate the result with the word "years".