加班时间为17:00到24:00,去掉半个小时吃饭时间,用excel函数怎么编写公式?
呵呵,如果A1是17:00,B1是24:00 那么在C1输入=CEILING((B1-A1)*24-0.5,0.1) 如果A1输入是17:00-24:00,那么C1中输入 =CEILING(ABS(IF(TIMEVALUE(RIGHT(A1,LEN(A1)-FIND("-",A1,1)))=0,1,TIMEVALUE(RIGHT(A1,LEN(A1)-FIND("-",A1,1))))-TIMEVALUE(LEFT(A1,FIND("-",A1,1)-1)))*24-0.5,0.1)