我原本的公式是
=IF(B4="","",SUMPRODUCT((AJ4/12*LOOKUP(D4:AB4,{0,1,2,4},{0,0.4,0.8,1}))*(MOD(COLUMN(D4:AB4)-4,8)=0))+SUMPRODUCT((AJ4/12*LOOKUP(E4:AC4,{0,2,3,5},{0,0.3,0.7,1}))*(MOD(COLUMN(E4:AC4)-4,8)=1))+IF(SUMIF($D$3:$AI$3,"旷工",D4:AI4)>=5,AJ4,SUMPRODUCT((AJ4/12*LOOKUP(J4:AH4,{0,1,1.5,2},{0,0.5,0.8,1}))*(MOD(COLUMN(J4:AH4)-4,8)=6)))+(SUMIF($D$3:$AB$3,"产假",D4:AB4)+SUMIF($D$3:$AB$3,"丧假",D4:AB4)+SUMIF($D$3:$AB$3,"婚假",D4:AB4)+SUMIF($D$3:$AB$3,"年休假",D4:AB4))*(AJ4/300))
但是在使用时发现当某一个月的病假扣款+事假扣款+旷工扣款总额超过当月工龄工资时就错了,扣超了,请大侠们帮忙修改公式 |