Home > Article > Software Tutorial > How to calculate length of service in Excel_A function can help you
Calculating length of service has always been a problem for the personnel department. The traditional calculation method is cumbersome and error-prone. In order to solve this problem, PHP editor Youzi brings you a solution-use Excel functions for calculations. Here's how to easily calculate length of service using Excel functions:
First, let's take the following table as an example.
First, we enter the function DATEDIF in the working column. The first parameter in brackets is the starting time, and we select the cell import date for the work. Then the second parameter is the end time, and we enter the TODAY() function to represent the current date. Finally, the third parameter is the time unit. We enter Y for year, M for month, and D for day. Please fill it in according to the actual situation. We use days as the unit here. Original text: Enter the function DATEDIF in the work column. The first parameter in brackets is the starting time, and we select the cell import date for the work. Then the second parameter is the end time, and we enter the TODAY() function to represent the current date. Finally, the third parameter is the time unit. We enter Y for year, M for month, and D for day. Please fill it in according to the actual situation. We use days as the unit here. Rewrite: Enter the function DATEDIF in the working cell. The first parameter in brackets is the starting time. We select the corresponding cell to import the date. Then, the second parameter is the end time, and we enter the TODAY() function to represent the current date. Finally, the third parameter is the time unit, we are in days, so enter D. Proceed according to the actual situation
# Finally, we press Enter, the length of service will be calculated, and then we can double-click to fill it in.
The above is the detailed content of How to calculate length of service in Excel_A function can help you. For more information, please follow other related articles on the PHP Chinese website!