先计算两个时间之差,公式=IF(ISNUMBER(FIND(":",RIGHT(B2,LEN(B2)-FIND("-",B2)-1))),TIME(LEFT(RIGHT(B2,LEN(B2)-FIND("-",B2)-1),FIND(":",RIGHT(B2,LEN(B2)-FIND("-",B2)-1))-1),RIGHT(RIGHT(B2,LEN(B2)-FIND("-",B2)-1),FIND(":",RIGHT(B2,LEN(B2)-FIND("-",B2)-1))-1),0),TIME(RIGHT(B2,LEN(B2)-FIND("-",B2)-1),0,0))-IF(ISNUMBER(FIND(":",LEFT(B2,FIND("-",B2)-1))),TIME(LEFT(LEFT(B2,FIND("-",B2)-1),FIND(":",LEFT(B2,FIND("-",B2)-1))-1),RIGHT(LEFT(B2,FIND("-",B2)-1),FIND(":",LEFT(B2,FIND("-",B2)-1))-1),0),TIME(LEFT(B2,FIND("-",B2)-1),0,0))
再把时间之差进行求和,得到的是以天为单元的合计数,再把这个合计数乘以24,即公式=SUM(C2:C6)*24。
具体操作结果如下:
如果帮到您请记得点赞或关注哦!