Time Range Count

anhelly

New Member
Joined
Aug 31, 2016
Messages
2
I have a spread sheet that lists the date and time of an event in the separate cell (mm/dd/yy h:mm). I need to find a way to count the simultaneous calls. Then it will output the maximum number of simultaneous calls based from given data regardless of number of row .

So for this example I should have an output of 4 as value for SIMULTANEOUS_CALLS

since calls for coming form caller 6-9 p happened at the same time at
1/1/2016 8:14 to 1/1/2016 8:17 even though they have different start time and end time.

and it repeated twice ........
In addition I should also have an output of 2 as value for OCCURRENCE

since calls for coming form caller 10-13 happened at the same time at 1/1/2016 8:44 to 1/1/2016 8:46 even though they have different start time and end time.

So for this example ,and based from observation we have a clue to get the the time range where calls occur simultaneously.Which is the maximum start time and minimum end time.

Any help would be greatly appreciated. I am completely stuck. Below is a sample data and the initial formula but it only count the number of calls between 8am to 9am.

=COUNTIFS(B1:B13,">=8:00",B1:B13,"<=9:00")

Caller Number start_time end_time
1 1/1/2016 8:00 1/1/2016 8:04 -- calls from caller 1-3 are happening at the same time
2 1/1/2016 8:02 1/1/2016 8:07 -- calls from caller 1-3 are happening at the same time
3 1/1/2016 8:03 1/1/2016 8:05 -- calls from caller 1-3 are happening at the same time


4 1/1/2016 8:02 1/1/2016 8:03 -- calls from caller 4-5 are happening at the same time
5 1/1/2016 8:04 1/1/2016 8:05 -- calls from caller 4-5 are happening at the same time


6 1/1/2016 8:11 1/1/2016 8:19 -- calls from caller 6 -9 are happening at the same time
7 1/1/2016 8:12 1/1/2016 8:18 -- calls from caller 6 -9 are happening at the same time
8 1/1/2016 8:13 1/1/2016 8:17 -- calls from caller 6 -9 are happening at the same time
9 1/1/2016 8:14 1/1/2016 8:20 -- calls from caller 6 -9 are happening at the same time

10 1/1/2016 8:37 1/1/2016 8:49 -- calls from caller 10-13 are happening at the same time
11 1/1/2016 8:40 1/1/2016 8:47 -- calls from caller 10-13 are happening at the same time
12 1/1/2016 8:41 1/1/2016 8:46 -- calls from caller 10-13 are happening at the same time
13 1/1/2016 8:44 1/1/2016 8:48 -- calls from caller 10-13 are happening at the same time
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Try to state the output counts (outcome) you desire from your sample:

[Table="width:, class:grid"][tr][td]Row\Col[/td][td]
A​
[/td][td]
B​
[/td][td]
C​
[/td][/tr]
[tr][td]
1​
[/td][td]Caller Number[/td][td]start_time[/td][td]end_time[/td][/tr]


[tr][td]
2​
[/td][td]
1
[/td][td]
1/1/2016 8:00​
[/td][td]
1/1/2016 8:04​
[/td][/tr]


[tr][td]
3​
[/td][td]
2
[/td][td]
1/1/2016 8:02​
[/td][td]
1/1/2016 8:07​
[/td][/tr]


[tr][td]
4​
[/td][td]
3
[/td][td]
1/1/2016 8:03​
[/td][td]
1/1/2016 8:05​
[/td][/tr]


[tr][td]
5​
[/td][td]
[/td][td][/td][td][/td][/tr]


[tr][td]
6​
[/td][td]
[/td][td][/td][td][/td][/tr]


[tr][td]
7​
[/td][td]
4
[/td][td]
1/1/2016 8:02​
[/td][td]
1/1/2016 8:03​
[/td][/tr]


[tr][td]
8​
[/td][td]
5
[/td][td]
1/1/2016 8:04​
[/td][td]
1/1/2016 8:05​
[/td][/tr]


[tr][td]
9​
[/td][td]
[/td][td][/td][td][/td][/tr]


[tr][td]
10​
[/td][td]
[/td][td][/td][td][/td][/tr]


[tr][td]
11​
[/td][td]
6
[/td][td]
1/1/2016 8:11​
[/td][td]
1/1/2016 8:19​
[/td][/tr]


[tr][td]
12​
[/td][td]
7
[/td][td]
1/1/2016 8:12​
[/td][td]
1/1/2016 8:18​
[/td][/tr]


[tr][td]
13​
[/td][td]
8
[/td][td]
1/1/2016 8:13​
[/td][td]
1/1/2016 8:17​
[/td][/tr]


[tr][td]
14​
[/td][td]
9
[/td][td]
1/1/2016 8:14​
[/td][td]
1/1/2016 8:20​
[/td][/tr]


[tr][td]
15​
[/td][td]
[/td][td][/td][td][/td][/tr]


[tr][td]
16​
[/td][td]
1
[/td][td]
1/1/2016 8:03​
[/td][td]
1/1/2016 8:04​
[/td][/tr]


[tr][td]
17​
[/td][td]
1
[/td][td]
1/1/2016 8:04​
[/td][td]
1/1/2016 8:04​
[/td][/tr]


[tr][td]
18​
[/td][td]
1
[/td][td]
1/1/2016 8:04​
[/td][td]
1/1/2016 8:04​
[/td][/tr]


[tr][td]
19​
[/td][td]
1
[/td][td]
1/1/2016 8:04​
[/td][td]
1/1/2016 8:04​
[/td][/tr]
[/table]
 
Upvote 0
Try to state the output counts (outcome) you desire from your sample:

[TABLE="class: grid"]
<tbody>[TR]
[TD]Row\Col[/TD]
[TD]
A​
[/TD]
[TD]
B​
[/TD]
[TD]
C​
[/TD]
[/TR]
[TR]
[TD]
1​
[/TD]
[TD]Caller Number[/TD]
[TD]start_time[/TD]
[TD]end_time[/TD]
[/TR]
[TR]
[TD]
2​
[/TD]
[TD]
1
[/TD]
[TD]
1/1/2016 8:00​
[/TD]
[TD]
1/1/2016 8:04​
[/TD]
[/TR]
[TR]
[TD]
3​
[/TD]
[TD]
2
[/TD]
[TD]
1/1/2016 8:02​
[/TD]
[TD]
1/1/2016 8:07​
[/TD]
[/TR]
[TR]
[TD]
4​
[/TD]
[TD]
3
[/TD]
[TD]
1/1/2016 8:03​
[/TD]
[TD]
1/1/2016 8:05​
[/TD]
[/TR]
[TR]
[TD]
5​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
6​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
7​
[/TD]
[TD]
4
[/TD]
[TD]
1/1/2016 8:02​
[/TD]
[TD]
1/1/2016 8:03​
[/TD]
[/TR]
[TR]
[TD]
8​
[/TD]
[TD]
5
[/TD]
[TD]
1/1/2016 8:01​
[/TD]
[TD]
1/1/2016 8:03​
[/TD]
[/TR]
[TR]
[TD]
9​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
10​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
11​
[/TD]
[TD]
6
[/TD]
[TD]
1/1/2016 8:11​
[/TD]
[TD]
1/1/2016 8:19​
[/TD]
[/TR]
[TR]
[TD]
12​
[/TD]
[TD]
7
[/TD]
[TD]
1/1/2016 8:12​
[/TD]
[TD]
1/1/2016 8:18​
[/TD]
[/TR]
[TR]
[TD]
13​
[/TD]
[TD]
8
[/TD]
[TD]
1/1/2016 8:13​
[/TD]
[TD]
1/1/2016 8:17​
[/TD]
[/TR]
[TR]
[TD]
14​
[/TD]
[TD]
9
[/TD]
[TD]
1/1/2016 8:14​
[/TD]
[TD]
1/1/2016 8:20​
[/TD]
[/TR]
[TR]
[TD]
15​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
16​
[/TD]
[TD]
1
[/TD]
[TD]
1/1/2016 8:03​
[/TD]
[TD]
1/1/2016 8:04​
[/TD]
[/TR]
[TR]
[TD]
17​
[/TD]
[TD]
1
[/TD]
[TD]
1/1/2016 8:04​
[/TD]
[TD]
1/1/2016 8:04​
[/TD]
[/TR]
[TR]
[TD]
18​
[/TD]
[TD]
1
[/TD]
[TD]
1/1/2016 8:04​
[/TD]
[TD]
1/1/2016 8:04​
[/TD]
[/TR]
[TR]
[TD]
19​
[/TD]
[TD]
1
[/TD]
[TD]
1/1/2016 8:04​
[/TD]
[TD]
1/1/2016 8:04​
[/TD]
[/TR]
</tbody>[/TABLE]


There are two answer that must appear in another column for example in column E it should say SIMULTANEOUS_CALLS=4 OCCURRENCE=2 something like that.
as you may observe as an initial comparison which is caller 1 and 2


caller 1 -2 they met bet 1/1/2016 8:02 and 1/1/2016 8:04 it will Output SIMULTANEOUS_CALLS=2 (then adding the data for caller 3)
caller 1 -3 they met bet 1/1/2016 8:03 and 1/1/2016 8:04 it will Output SIMULTANEOUS_CALLS=3 (then adding the data for caller 4)
caller 1 -4 they met bet 1/1/2016 8:02 and 1/1/2016 8:03 it will still Output SIMULTANEOUS_CALLS=3

This is because caller number 4 happened between 1/1/2016 8:02 and 1/1/2016 8:03 then adding data for caller 5




caller 1 -5 they met bet 1/1/2016 8:03 and 1/1/2016 8:04 it will still Output SIMULTANEOUS_CALLS=3 ls since caller number 5 happened
between 1/1/2016 8:01 and 1/1/2016 8:03.




This process will continue until the end of data in column.In this case it will super cede the previous output for SIMULTANEOUS_CALLS=
3 since calls from callers 6-9 simultaneously happened between 1/1/2016 8:14 and 1/1/2016 8:17
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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