Calculate the amount of overlapping time

jameslec

New Member
Joined
Jun 21, 2013
Messages
10
Good afternoon. I have been looking all over and cannot find an answer on how to do this. I work for a call center that takes inbound technical support calls. We recently added a chat support option for our end users. Our chat agents can take up to 3 chats at the same time. I need to determine the total amount of concurrent chats for each agent per day as well as the total amount of concurrent time for each agent per day. Below is a sample of my data. Notice how the start time on row 5 is earlier than the end time on row 4. I need excel to count this as a concurrent chat and then calculate the amount of time that was concurrent (in this example it would be 16 minutes). Currently I have 2000 rows of data and 30 different agents.

Start_Time End_Time Agent Name (Num)
6/3/13 12:136/3/13 12:2414
6/3/13 12:426/3/13 13:0414
6/5/13 12:076/5/13 12:1214
6/5/13 12:316/5/13 13:0614
6/5/13 12:506/5/13 13:0814
6/5/13 14:186/5/13 14:3214
6/5/13 14:306/5/13 14:3814
6/5/13 14:456/5/13 14:5314
6/5/13 14:596/5/13 14:5914
5/31/13 8:245/31/13 8:3715
5/31/13 11:465/31/13 11:5315
5/31/13 14:005/31/13 14:0615
5/31/13 14:125/31/13 14:5715
5/31/13 14:185/31/13 14:5615
5/31/13 15:145/31/13 15:4115
5/31/13 15:175/31/13 15:2115
5/31/13 15:355/31/13 15:4315
5/31/13 16:025/31/13 16:0615
5/31/13 16:195/31/13 16:2915
5/31/13 16:295/31/13 16:3615

<colgroup><col><col><col></colgroup><tbody>
</tbody>

<colgroup><col><col><col></colgroup><tbody>
</tbody>
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Re: How to calculate the amount of overlapping time

Try this.
In cell D3 (second call row):
=IF(AND(B2>A3,C2=C3),"Chat","")

In E3 use this:
=IF(D3>"",B2-A3,"")

Drag to copy them down.
 
Upvote 0
Re: How to calculate the amount of overlapping time

Thank you for the quick reply. At first I thought you had nailed it, but after looking further I don't think it is right.
If you look below chat # 4 shows 17.7 min concurrency, but the chat itself was only 8 minutes long. Somehow I think it also needs to look at the end date.

Start_TimeEnd_TimeAgent Name (Num)Chat UpTime Up
5/31/13 8:29:325/31/13 8:51:3314
5/31/13 8:39:055/31/13 8:59:1214Chat12.47
5/31/13 8:51:455/31/13 9:16:4614Chat7.45
5/31/13 8:59:045/31/13 9:07:3514Chat17.70
5/31/13 9:22:225/31/13 9:39:1214
5/31/13 9:32:355/31/13 9:39:3514Chat6.62
5/31/13 10:13:445/31/13 10:29:5014
5/31/13 10:37:315/31/13 10:58:5114
6/3/13 12:13:086/3/13 12:24:2314

<colgroup><col span="2"><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
Re: How to calculate the amount of overlapping time

ok, this one will choose the lowest value of the overlapping time or the length of the call.
=IF(D3>"",MEDIAN(0,B2-A3,B3-A3),"")
 
Upvote 0
Re: How to calculate the amount of overlapping time

A possible solution (dates as dd/mm/yyyy)

A B C D E F (headers in row 1)

Start_Time
End_Time
Agent_Num
Agent_Num
Minutes
06/03/2013 12:13
06/03/2013 12:24
14
14
18
06/03/2013 12:42
06/03/2013 13:04
14
15
42
06/05/2013 12:07
06/05/2013 12:12
14
Total
60
06/05/2013 12:31
06/05/2013 13:06
14
06/05/2013 12:50
06/05/2013 13:08
14
06/05/2013 14:18
06/05/2013 14:32
14
06/05/2013 14:30
06/05/2013 14:38
14
06/05/2013 14:45
06/05/2013 14:53
14
06/05/2013 14:59
06/05/2013 14:59
14
31/05/2013 08:24
31/05/2013 08:37
15
31/05/2013 11:46
31/05/2013 11:53
15
31/05/2013 14:00
31/05/2013 14:06
15
31/05/2013 14:12
31/05/2013 14:57
15
31/05/2013 14:18
31/05/2013 14:56
15
31/05/2013 15:14
31/05/2013 15:41
15
31/05/2013 15:17
31/05/2013 15:21
15
31/05/2013 15:35
31/05/2013 15:43
15
31/05/2013 16:02
31/05/2013 16:06
15
31/05/2013 16:19
31/05/2013 16:29
15
31/05/2013 16:29
31/05/2013 16:36
15

<TBODY>
</TBODY>


Formula in F2
=SUMPRODUCT(--($C$2:$C$21=$E2),--($B$2:B$21>$A$3:$A$22),--($A$3:$A$22<>""),($B$2:$B$21-$A$3:$A$22)-($B$2:$B$21-$B$3:$B$22)*($B$2:$B$21>$B$3:$B$22)*($B$3:$B$22<>0))*1440

copy down to F3

M.

 
Last edited:
Upvote 0
Re: How to calculate the amount of overlapping time

Thank you very much for your reply. I am looking at this method as well as Vidar's method. I will play with both and let you know on Monday how it goes. :) Thank you both.
 
Upvote 0
Re: How to calculate the amount of overlapping time

Hello,

I am working on a similar problem to this and the formula

=SUMPRODUCT(--($C$2:$C$21=$E2),--($B$2:B$21>$A$3:$A$22),--($A$3:$A$22<>""),($B$2:$B$21-$A$3:$A$22)-($B$2:$B$21-$B$3:$B$22)*($B$2:$B$21>$B$3:$B$22)*($B$3:$B$22<>0))*1440

seems to be working for all intents and purposes. I am wondering how to get the cells with overlap to be highlighted ?

Can anyone assist ?

Thank You!



A possible solution (dates as dd/mm/yyyy)

A B C D E F (headers in row 1)

Start_TimeEnd_TimeAgent_NumAgent_NumMinutes
06/03/2013 12:1306/03/2013 12:24141418
06/03/2013 12:4206/03/2013 13:04141542
06/05/2013 12:0706/05/2013 12:1214Total60
06/05/2013 12:3106/05/2013 13:0614
06/05/2013 12:5006/05/2013 13:0814
06/05/2013 14:1806/05/2013 14:3214
06/05/2013 14:3006/05/2013 14:3814
06/05/2013 14:4506/05/2013 14:5314
06/05/2013 14:5906/05/2013 14:5914
31/05/2013 08:2431/05/2013 08:3715
31/05/2013 11:4631/05/2013 11:5315
31/05/2013 14:0031/05/2013 14:0615
31/05/2013 14:1231/05/2013 14:5715
31/05/2013 14:1831/05/2013 14:5615
31/05/2013 15:1431/05/2013 15:4115
31/05/2013 15:1731/05/2013 15:2115
31/05/2013 15:3531/05/2013 15:4315
31/05/2013 16:0231/05/2013 16:0615
31/05/2013 16:1931/05/2013 16:2915
31/05/2013 16:2931/05/2013 16:3615

<tbody>
</tbody>


Formula in F2
=SUMPRODUCT(--($C$2:$C$21=$E2),--($B$2:B$21>$A$3:$A$22),--($A$3:$A$22<>""),($B$2:$B$21-$A$3:$A$22)-($B$2:$B$21-$B$3:$B$22)*($B$2:$B$21>$B$3:$B$22)*($B$3:$B$22<>0))*1440

copy down to F3

M.

 
Upvote 0
Re: How to calculate the amount of overlapping time

Hello,

I am working on a similar problem to this and the formula

=SUMPRODUCT(--($C$2:$C$21=$E2),--($B$2:B$21>$A$3:$A$22),--($A$3:$A$22<>""),($B$2:$B$21-$A$3:$A$22)-($B$2:$B$21-$B$3:$B$22)*($B$2:$B$21>$B$3:$B$22)*($B$3:$B$22<>0))*1440

seems to be working for all intents and purposes. I am wondering how to get the cells with overlap to be highlighted ?

Can anyone assist ?

Thank You!

Try to provide a small data sample along with expected results.

M.
 
Upvote 0
Re: How to calculate the amount of overlapping timeco

Hello Marcelo, thank you for the reply and my apologies for the late reply. I can provide a google sheet link to my data if that is helpful.

https://docs.google.com/spreadsheets/d/1qAH4EvuuTR6sDe100RYXylJLZ7QAt9HXZOzIJIBnNfo/edit?usp=sharing

I am trying to compare shifts worked by home medical workers (PCA) at different agencies attempting to find overlaps with the formula posted in this forum topic.

Column N ties Columns B, C,D, E together, but I do not know how to expand the formula to tie Columns H,I,J,K together....

Also Column Q is supposed to calculate a total number hours of overlap but I cannot seem to get that formula to work.

Any advice or guidance would be most appreciated.

Thank You for Your Time!

Try to provide a small data sample along with expected results.

M.
 
Upvote 0
Re: How to calculate the amount of overlapping timeco

I didn't understand exactly what you are trying to do.
(this is an old thread and i don't remember what i did to solve it)

I think you should create a new thread with a small data sample along with expected results. Doing so, others members also can help.

M.
 
Upvote 0

Forum statistics

Threads
1,215,035
Messages
6,122,791
Members
449,095
Latest member
m_smith_solihull

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