Count of calls that are active in one hour slots

pgurung13

New Member
Joined
Jun 12, 2018
Messages
1
The first column is the start time and the second is the end time of a call. I want to count the number of calls that are going on in 1 hour time slots.

[TABLE="width: 310"]
<colgroup><col><col></colgroup><tbody></tbody>[/TABLE]
[TABLE="width: 310"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD="align: right"]15/02/2018 08:04[/TD]
[TD="align: right"]15/02/2018 09:22[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018 08:05[/TD]
[TD="align: right"]15/02/2018 08:12[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018 08:12[/TD]
[TD="align: right"]15/02/2018 09:22[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018 08:24[/TD]
[TD="align: right"]15/02/2018 08:56[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018 08:27[/TD]
[TD="align: right"]15/02/2018 08:56[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018 08:28[/TD]
[TD="align: right"]15/02/2018 08:34[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018 08:31[/TD]
[TD="align: right"]15/02/2018 08:34[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018 08:59[/TD]
[TD="align: right"]15/02/2018 09:30[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018 08:59[/TD]
[TD="align: right"]15/02/2018 09:30[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018 09:00[/TD]
[TD="align: right"]15/02/2018 10:02[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018 09:03[/TD]
[TD="align: right"]15/02/2018 09:30[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018 09:04[/TD]
[TD="align: right"]15/02/2018 09:08[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018 09:05[/TD]
[TD="align: right"]15/02/2018 09:07[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018 09:12[/TD]
[TD="align: right"]15/02/2018 10:34[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 310"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD="align: right"]15/02/2018 09:12[/TD]
[TD="align: right"]15/02/2018 10:31[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018 09:15[/TD]
[TD="align: right"]15/02/2018 10:33[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018 09:16[/TD]
[TD="align: right"]15/02/2018 09:30[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018 09:17[/TD]
[TD="align: right"]15/02/2018 10:31[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018 09:17[/TD]
[TD="align: right"]15/02/2018 10:02[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018 09:19[/TD]
[TD="align: right"]15/02/2018 10:02[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018 09:30[/TD]
[TD="align: right"]15/02/2018 10:10[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018 09:30[/TD]
[TD="align: right"]15/02/2018 10:10[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018 09:55[/TD]
[TD="align: right"]15/02/2018 10:35[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018 09:58[/TD]
[TD="align: right"]15/02/2018 11:01[/TD]
[/TR]
</tbody>[/TABLE]


I also have start and end time criteria each with an increment of 1 hour.
[TABLE="width: 401"]
<colgroup><col span="2"><col></colgroup><tbody>[TR]
[TD="align: right"]15/02/2018 07:00[/TD]
[TD="align: right"]15/02/2018 08:00[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018 08:00[/TD]
[TD="align: right"]15/02/2018 09:00[/TD]
[TD="align: right"]
5
[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018 09:00[/TD]
[TD="align: right"]15/02/2018 10:00[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018 10:00[/TD]
[TD="align: right"]15/02/2018 11:00[/TD]
[TD="align: right"]1[/TD]
[/TR]
</tbody>[/TABLE]

For example, if we look at 08:00 to 09:00 time slot, I used the below function..

=COUNTIFS('start time range',">="&'08:00','end time range',"<"&'09:00')

.. it gives out 5 when I wanted the result to be 9. This is because calls that went past 09:00 (in red) were ignored. How can I amend the function so it counts those calls as well?
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Maybe...


[Table="class: grid"][tr][td="bgcolor: #DCE6F1"][/td][td="bgcolor: #DCE6F1"]
A
[/td][td="bgcolor: #DCE6F1"]
B
[/td][td="bgcolor: #DCE6F1"]
C
[/td][td="bgcolor: #DCE6F1"]
D
[/td][td="bgcolor: #DCE6F1"]
E
[/td][td="bgcolor: #DCE6F1"]
F
[/td][td="bgcolor: #DCE6F1"]
G
[/td][/tr]
[tr][td="bgcolor: #DCE6F1"]
1
[/td][td]
Start​
[/td][td]
End​
[/td][td][/td][td][/td][td]
Start​
[/td][td]
End​
[/td][td]
Count​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
2
[/td][td]
15/02/2018 08:04​
[/td][td]
15/02/2018 09:22​
[/td][td][/td][td][/td][td]
15/02/2018 07:00​
[/td][td]
15/02/2018 08:00​
[/td][td]
0​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
3
[/td][td]
15/02/2018 08:05​
[/td][td]
15/02/2018 08:12​
[/td][td][/td][td][/td][td]
15/02/2018 08:00​
[/td][td]
15/02/2018 09:00​
[/td][td]
9​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
4
[/td][td]
15/02/2018 08:12​
[/td][td]
15/02/2018 09:22​
[/td][td][/td][td][/td][td]
15/02/2018 09:00​
[/td][td]
15/02/2018 10:00​
[/td][td]
19​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
5
[/td][td]
15/02/2018 08:24​
[/td][td]
15/02/2018 08:56​
[/td][td][/td][td][/td][td]
15/02/2018 10:00​
[/td][td]
15/02/2018 11:00​
[/td][td]
11​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
6
[/td][td]
15/02/2018 08:27​
[/td][td]
15/02/2018 08:56​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
7
[/td][td]
15/02/2018 08:28​
[/td][td]
15/02/2018 08:34​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
8
[/td][td]
15/02/2018 08:31​
[/td][td]
15/02/2018 08:34​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
9
[/td][td]
15/02/2018 08:59​
[/td][td]
15/02/2018 09:30​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
10
[/td][td]
15/02/2018 08:59​
[/td][td]
15/02/2018 09:30​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
11
[/td][td]
15/02/2018 09:00​
[/td][td]
15/02/2018 10:02​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
12
[/td][td]
15/02/2018 09:03​
[/td][td]
15/02/2018 09:30​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
13
[/td][td]
15/02/2018 09:04​
[/td][td]
15/02/2018 09:08​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
14
[/td][td]
15/02/2018 09:05​
[/td][td]
15/02/2018 09:07​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
15
[/td][td]
15/02/2018 09:12​
[/td][td]
15/02/2018 10:34​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
16
[/td][td]
15/02/2018 09:12​
[/td][td]
15/02/2018 10:31​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
17
[/td][td]
15/02/2018 09:15​
[/td][td]
15/02/2018 10:33​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
18
[/td][td]
15/02/2018 09:16​
[/td][td]
15/02/2018 09:30​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
19
[/td][td]
15/02/2018 09:17​
[/td][td]
15/02/2018 10:31​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
20
[/td][td]
15/02/2018 09:17​
[/td][td]
15/02/2018 10:02​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
21
[/td][td]
15/02/2018 09:19​
[/td][td]
15/02/2018 10:02​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
22
[/td][td]
15/02/2018 09:30​
[/td][td]
15/02/2018 10:10​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
23
[/td][td]
15/02/2018 09:30​
[/td][td]
15/02/2018 10:10​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
24
[/td][td]
15/02/2018 09:55​
[/td][td]
15/02/2018 10:35​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
25
[/td][td]
15/02/2018 09:58​
[/td][td]
15/02/2018 11:01​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
26
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]
[/table]


Formula in G2 copied down
=SUMPRODUCT(1-((A$2:A$25>=F2)+(E2>=B$2:B$25)))

M.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top