#How does the excel year function calculate length of service?
1. Taking the excel2010 version as an example, as shown in the figure below, the length of service must be calculated based on the date of entering the company and the specified year;
Recommended tutorial: excel tutorial
2. First, enter the formula =YEAR($E$2)-YEAR(B2) in cell C2. Since the specified years are the same, use absolute references. symbol to fix this value, so that the specified year will not change when the formula is filled in. Press the enter key to get the calculation result;
3. Then put the mouse In the lower right corner of cell C2, drop down the formula to fill in the formula, and you can calculate everyone's length of service.
The above is the detailed content of How to calculate length of service using excel year function. For more information, please follow other related articles on the PHP Chinese website!