我正在尝试一种方法,根据他们的开始时间和结束时间来计算每天每30分钟有多少人有空, 但是我不能在公式中添加日期条件(当在下面提到的公式中添加另一个条件时,我会得到#NA
我尝试了以下公式 = SUMPRODUCT(((-(C $ 2:C $ 1000 =“ 1/1/2019”)*(A $ 2:A $ 1000 <= D2)+(B $ 2:B $ 1000> D2)+(A $ 2:A $ 1000 > B $ 2:B $ 1000)= 2)+0))
+-------+-------+------------+
| Start | End | Date |
+-------+-------+------------+
| 17:30 | 02:30 | 02/01/2019 |
| 17:30 | 02:30 | 02/01/2019 |
| 17:30 | 02:30 | 02/01/2019 |
| 17:30 | 02:30 | 02/01/2019 |
| 17:30 | 02:30 | 01/01/2019 |
| 17:30 | 02:30 | 01/01/2019 |
| 16:00 | 01:00 | 01/01/2019 |
| 16:00 | 01:00 | 01/01/2019 |
| 16:00 | 01:00 | 01/01/2019 |
| 15:00 | 00:00 | 02/01/2019 |
| 15:00 | 00:00 | 02/01/2019 |
| 15:00 | 00:00 | 02/01/2019 |
| 15:00 | 00:00 | 02/01/2019 |
| 15:00 | 00:00 | 02/01/2019 |
| 15:00 | 00:00 | 02/01/2019 |
| 15:00 | 00:00 | 01/01/2019 |
| 15:00 | 00:00 | 01/01/2019 |
| 15:00 | 00:00 | 01/01/2019 |
| 15:00 | 00:00 | 01/01/2019 |
| 15:00 | 00:00 | 01/01/2019 |
| 15:00 | 22:00 | 01/01/2019 |
| 14:30 | 18:30 | 01/01/2019 |
| 14:30 | 18:30 | 01/01/2019 |
| 14:30 | 18:30 | 01/01/2019 |
| 14:30 | 18:30 | 01/01/2019 |
| 14:30 | 18:30 | 01/01/2019 |
| 14:30 | 18:30 | 01/01/2019 |
+-------+-------+------------+
答案 0 :(得分:0)