设A1单元格是员工进厂日期,在B1单元格键入如下公式,
=ROUNDDOWN(DAYS360(IF(DAY(A1)>15,DATE(YEAR(A1),MONTH(A1)+1,1),DATE(YEAR(A1),MONTH(A1),1)),TODAY(),1)/360,0)*80
就可以算出该员的工龄工资。
假设进厂日期在A2单元格,在C2开始求工龄工资,C2的公式为=IF(DAY(A2)<16,DATEDIF(A2,TODAY(),"Y")*80,DATEDIF(DATE(YEAR(A2),MONTH(A2)+1,1),TODAY(),"Y")*80),向下填充即可!
=DATEDIF(IF(DAY(A1)>15,EDATE(A1,1)-DAY(A1),A1-DAY(A1)+1),TODAY(),"y")*80
就行了
设入厂日期为A1,
=datedif(a1,today(),"y")