求教用excel自动生全年排班表并可自动统计工时

2023-05-05 综合 25阅读

A列是全部日期

B2=TEXT(WEEKDAY(A2,1),"aaaa"),槐察往下拖清明数

C2手填

C3=INDEX($H$1:$H$15,SUMPRODUCT(0+($F$2:$F$15=B3),0+($G$2:$G$15=C2),ROW($H$2:$H$15))),往下拖

D2=IF(AND(WEEKDAY(A2,1)>答首2,WEEKDAY(A2,1)<6),IF(C2="A","B","A"),IF(C2="A","A","B")),往 下拖

F到H列是排班的清单参考表,可以按我写的

K1和K2是查询班次的起止日期

K5=COUNTIFS($A:$A,">=" &$K$1,$A:$A,"<=" &$K$2,C:C,"=A"),往 右拖

K6=COUNTIFS($A:$A,">=" &$K$1,$A:$A,"<=" &$K$2,C:C,"=B"),往 右拖

本例没有做节假日,节假日需要手动改一下,后续会自动变化的

声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com