如果起始时间放放在A1单元格,结束时间放在B1单元格,则公式为:=(ROUNDUP(B1-A1,0)-ROUNDDOWN((WEEKDAY(A1)+ROUNDUP(B1-A1,0))/7,0))*8+IF(WEEKDAY(A1)=7,0,IF(MOD(A1,1)TIME(17,30,0),0,0))))))+IF(WEEKDAY(B1)=7,0,IF(MOD(B1,1)TIME(17,30,0),8,0))))))你试试看是不是满足要求吧