Count number of times event happens.

Tspears1

New Member
Joined
Jan 26, 2024
Messages
6
Office Version
  1. 2013
Platform
  1. Windows
Not sure if this is possible, but I thought would ask. In the below example I need to find out how many times a Tech left a call and then in less than 30 minutes later, that line called again. For example on 10/22/2024 Tech B left line 1 at 1012(military time) and line 1 called again at 1030. This will add 1 to Tech B total. So in this example Tech A = 1, Tech B = 4, Tech C = 2.

Any help with this would be greatly appreciated. I have a very large spreadsheet that I would like to extract this information from.

LINEDATECALL TIMEOUT TIMETECH
110/22/2024823845A
110/22/20249551012B
210/22/202410301035C
310/22/2024830840C
110/22/202410301055A
210/22/202410451115A
210/23/202414251450B
310/23/202412551310B
210/23/202415101530C
310/23/202413301345A
210/23/202415451650A
110/24/2024750830C
110/24/2024910930B
310/24/2024820835A
310/24/2024850920A
110/24/20249551020B
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Is this what you are looking for? Check this and revert -

Book1
ABCDEFGHIJK
1LINEDATECALL TIMEOUT TIMETECHCall GapCallsRepeat Call
2110/22/2024823845A 10A1
3110/22/20249551012B11021B3
4210/22/202410301035C 11C2
5310/22/2024830840C 10
6110/22/202410301055A1830
7210/22/202410451115A1020
8210/23/202414251450B 10
9310/23/202412551310B 11
10210/23/202415101530C6021
11310/23/202413301345A2020
12210/23/202415451650A1530
13110/24/2024750830C 10
14110/24/2024910930B8021
15310/24/2024820835A 11
16310/24/2024850920A1520
17110/24/20249551020B2530
Sheet1
Cell Formulas
RangeFormula
F2:F17F2=IF(COUNTIFS($A$1:A2,A2,$B$1:B2,B2)>=2,C2-IFERROR(LOOKUP(2,1/($A$1:A1=A2)*($B$1:B1=B2),$D$1:D1),""),"")
G2:G17G2=COUNTIFS($A$1:A2,A2,$B$1:B2,B2)
H2:H17H2=COUNTIFS(A:A,A2,B:B,B2,G:G,G2+1,F:F,"<"&30)
K2:K4K2=SUMIFS($H:$H,$E:$E,J2)
 
Upvote 0
Thanks Sanjay for the reply, this looks like it works but it did miss an occurrence for Tech B. In line 8, Tech B has an out time of 1450 and then line 2 calls again on line 10 at 1510, this is just 20 minutes and not 60.
 
Upvote 0
Thanks Sanjay for the reply, this looks like it works but it did miss an occurrence for Tech B. In line 8, Tech B has an out time of 1450 and then line 2 calls again on line 10 at 1510, this is just 20 minutes and not 60.
I was trying to find where the error is but couldn't locate it... Thanks for pointing that out.

If you may notice, this error is on account of format in which time has been stored. The obvious subtraction of 1450 from 1510 is 60. But when it will be stored in the time format the difference would be 0.5 which will come to 30 minutes. To rectify that error you need to convert recorded military time to the time format that excel understands.

Hope that helps you...
 
Upvote 0
Glad to help you and thanks for the feedback.
Sanjay, I thought everything was working but it is not. I can't get your repeat calls formula to work. I changed the times back into a time format and also modified your call gap formula to handle a negative number, but for some reason the repeat call formula is not working. I can not install the XL2BB because I do not have admin rights on my computer. I inserted a pic and the formulas used.

CALL TIME - =TIME(INT(C2/100), MOD(C2, 100), 0)
OUT TIME - =TIME(INT(C2/100), MOD(C2, 100), 0)
CALL GAP - =IF(COUNTIFS($A$1:A2,A2,$B$1:B2,B2)>=2,ABS(F2-IFERROR(LOOKUP(2,1/($A$1:A1=A2)*($B$1:B1=B2),$G$1:G1),"")),"")
CALLS - =COUNTIFS($A$1:A2,A2,$B$1:B2,B2)
REPEAT CALLS - =COUNTIFS(A:A,A2,B:B,B2,I:I,I2+1,H:H,"<"&30)

Repeat Calls.JPG


Thank you for your help.
 
Upvote 0
but for some reason the repeat call formula is not working
Repeats Call is not working because after changing back to Excel time format you didn't modify Formula.

Use following and revert -

for REPEAT CALLS
Excel Formula:
=COUNTIFS(A:A,A2,B:B,B2,I:I,I2+1,H:H,"<"&0.5)
 
Upvote 0
It is still not working
My mistake. At times you forget that you are working with time in Excel and do blunders...

Check this and revert -

Book2
ABCDEFGHIJKLM
1LINEDATECALL TIMEOUT TIMETECHCALL TIMEOUT TIME Call Gap CallsRepeat Call
2110/22/2024823845A8:23 AM8:45 AM 10A1
3110/22/20249551012B9:55 AM10:12 AM0.0521B4
4210/22/202410301035C10:30 AM10:35 AM 11C2
5310/22/2024830840C8:30 AM8:40 AM 10
6110/22/202410301055A10:30 AM10:55 AM0.0130
7210/22/202410451115A10:45 AM11:15 AM0.0120
8210/23/202414251450B2:25 PM2:50 PM 11
9310/23/202412551310B12:55 PM1:10 PM 111D1.00
10210/23/202415101530C3:10 PM3:30 PM0.01211H0.04
11310/23/202413301345A1:30 PM1:45 PM0.012030M0.02083
12210/23/202415451650A3:45 PM4:50 PM0.0130
13110/24/2024750830C7:50 AM8:30 AM 10
14110/24/2024910930B9:10 AM9:30 AM0.0321
15310/24/2024820835A8:20 AM8:35 AM 11
16310/24/2024850920A8:50 AM9:20 AM0.0120
17110/24/20249551020B9:55 AM10:20 AM0.0230
Sheet1
Cell Formulas
RangeFormula
F2:G17F2=TIME(INT(C2/100), MOD(C2, 100), 0)
H2:H17H2=IF(COUNTIFS($A$1:A2,A2,$B$1:B2,B2)>=2,F2-IFERROR(LOOKUP(2,1/($A$1:A1=A2)*($B$1:B1=B2),$G$1:G1),""),"")
I2:I17I2=COUNTIFS($A$1:A2,A2,$B$1:B2,B2)
J2:J17J2=COUNTIFS(A:A,A2,B:B,B2,I:I,I2+1,H:H,"<"&1/48)
M2:M4M2=SUMIFS($J:$J,$E:$E,L2)
M10M10=1/24
M11M11=M9/48
 
Upvote 0
Solution

Forum statistics

Threads
1,223,911
Messages
6,175,323
Members
452,635
Latest member
laura12345

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