✔ 最佳答案
00:00
00:59
110
01:00
01:59
110
02:00
02:59
110
03:00
03:59
110
04:00
04:59
110
05:00
05:59
110
06:00
06:59
110
07:00
07:59
95
08:00
08:59
95
09:00
09:59
95
10:00
10:59
95
11:00
11:59
95
12:00
12:59
95
13:00
13:59
95
14:00
14:59
95
15:00
15:59
95
16:00
16:59
95
17:00
17:59
95
18:00
18:59
95
19:00
19:59
95
20:00
20:59
95
21:00
21:59
95
22:00
22:59
110
23:00
23:59
110
首先於 A2:C25 輸入以上表格
E2=上班時間
F2=下班時間
G2=IF(E2<F2,SUMPRODUCT((A$2:A$25>=E2)*(B$2:B$25<=F2)*C$2:C$25),SUM(C$2:C$25)-SUMPRODUCT((A$2:A$25>=F2)*(B$2:B$25<=E2)*C$2:C$25))
或
G2=IF(E2="","",IF(E2<F2,SUMPRODUCT((A$2:A$25>=E2)*(B$2:B$25<=F2)*C$2:C$25),SUM(C$2:C$25)-SUMPRODUCT((A$2:A$25>=F2)*(B$2:B$25<=E2)*C$2:C$25)))
請參考附件:
http://www.FunP.Net/683410
Please try