Find all dates related to a client and then find the average time difference between them

corruptedlogic

New Member
Joined
Mar 8, 2018
Messages
12
Hi there, I have an export from our zendesk helpdesk and am trying to find the average time to solve a ticket. So far, I have tried to sum the Open date and the solved dates, then average the result. that seems to get me the correct answer ( i think!) until the first "solved date" is blank (because the first row for a client is something other than a solved or closed ticket), in that scenario i just get a whole bunch of ###### characters. I'm hoping someone can point me in the right direction to either only iterate through solved or closed tickets or somehow ignore the blanks in the solved date column. Totally open to suggestions!

The formulae i currently have are:

Sum solved dates: =INDEX(E:E,MATCH(M2,C:C,0))
Sum Open Dates: =INDEX(D:D,MATCH(M2,C:C,0))
Calc average solve time: =(I4-I3)*24

Thanks to all in advance, sample data set attached.
ABCDEFGHIJKLM
idStatusOrganizationRequest dateSolved dateLatest update
OpenClient 1Average hours to solveClientClient 1
OpenClient 1sum Open
ClosedClient 1sum Solve
On-holdClient 1
SolvedClient 1
ClosedClient 1
SolvedClient 1
OpenClient 1
PendingClient 1
ClosedClient 1
On-holdClient 1
ClosedClient 1
PendingClient 1
On-holdClient 1
ClosedClient 1
ClosedClient 1
ClosedClient 1
ClosedClient 1
PendingClient 1
ClosedClient 1
ClosedClient 1
ClosedClient 1
ClosedClient 2
SolvedClient 2
ClosedClient 2
ClosedClient 2
ClosedClient 2
ClosedClient 2
ClosedClient 2
ClosedClient 2
ClosedClient 2
ClosedClient 2
ClosedClient 2

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]2100[/TD]

[TD="align: right"]3/8/2018 11:42[/TD]
[TD="align: right"][/TD]
[TD="align: right"]3/8/2018 11:50[/TD]
[TD="align: right"][/TD]

[TD="align: right"]########[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]2098[/TD]

[TD="align: right"]3/8/2018 9:08[/TD]
[TD="align: right"][/TD]
[TD="align: right"]3/8/2018 9:12[/TD]
[TD="align: right"][/TD]

[TD="align: right"]43167.49[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]4[/TD]
[TD="align: right"]2082[/TD]

[TD="align: right"]3/6/2018 10:29[/TD]
[TD="align: right"]3/6/2018 10:31[/TD]
[TD="align: right"]3/6/2018 10:31[/TD]
[TD="align: right"][/TD]

[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]5[/TD]
[TD="align: right"]2076[/TD]

[TD="align: right"]3/5/2018 13:58[/TD]
[TD="align: right"][/TD]
[TD="align: right"]3/6/2018 8:38[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]6[/TD]
[TD="align: right"]2072[/TD]

[TD="align: right"]3/5/2018 11:18[/TD]
[TD="align: right"]3/5/2018 11:35[/TD]
[TD="align: right"]3/5/2018 11:35[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]7[/TD]
[TD="align: right"]2069[/TD]

[TD="align: right"]3/2/2018 10:35[/TD]
[TD="align: right"]3/6/2018 8:38[/TD]
[TD="align: right"]3/6/2018 8:38[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]8[/TD]
[TD="align: right"]2068[/TD]

[TD="align: right"]3/2/2018 10:14[/TD]
[TD="align: right"]3/8/2018 9:19[/TD]
[TD="align: right"]3/8/2018 9:19[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]9[/TD]
[TD="align: right"]2060[/TD]

[TD="align: right"]3/1/2018 10:03[/TD]
[TD="align: right"][/TD]
[TD="align: right"]3/1/2018 10:53[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]10[/TD]
[TD="align: right"]2053[/TD]

[TD="align: right"]2/28/2018 10:13[/TD]
[TD="align: right"][/TD]
[TD="align: right"]3/6/2018 7:02[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]11[/TD]
[TD="align: right"]2050[/TD]

[TD="align: right"]2/27/2018 12:06[/TD]
[TD="align: right"]2/27/2018 12:39[/TD]
[TD="align: right"]3/3/2018 13:06[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]12[/TD]
[TD="align: right"]2044[/TD]

[TD="align: right"]2/26/2018 17:33[/TD]
[TD="align: right"][/TD]
[TD="align: right"]2/27/2018 14:25[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]13[/TD]
[TD="align: right"]2043[/TD]

[TD="align: right"]2/26/2018 17:20[/TD]
[TD="align: right"]3/6/2018 8:38[/TD]
[TD="align: right"]3/6/2018 8:38[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]14[/TD]
[TD="align: right"]2041[/TD]

[TD="align: right"]2/26/2018 13:58[/TD]
[TD="align: right"][/TD]
[TD="align: right"]3/5/2018 10:28[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]15[/TD]
[TD="align: right"]2038[/TD]

[TD="align: right"]2/26/2018 10:27[/TD]
[TD="align: right"][/TD]
[TD="align: right"]3/8/2018 12:08[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]16[/TD]
[TD="align: right"]2037[/TD]

[TD="align: right"]2/23/2018 14:44[/TD]
[TD="align: right"]2/27/2018 12:53[/TD]
[TD="align: right"]3/3/2018 13:06[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]17[/TD]
[TD="align: right"]2021[/TD]

[TD="align: right"]2/22/2018 7:29[/TD]
[TD="align: right"]2/23/2018 8:35[/TD]
[TD="align: right"]2/27/2018 9:05[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]18[/TD]
[TD="align: right"]2019[/TD]

[TD="align: right"]2/20/2018 17:08[/TD]
[TD="align: right"]2/27/2018 12:53[/TD]
[TD="align: right"]3/3/2018 13:06[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]19[/TD]
[TD="align: right"]2018[/TD]

[TD="align: right"]2/20/2018 16:45[/TD]
[TD="align: right"]2/27/2018 10:51[/TD]
[TD="align: right"]3/3/2018 11:07[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]20[/TD]
[TD="align: right"]2007[/TD]

[TD="align: right"]2/16/2018 13:06[/TD]
[TD="align: right"][/TD]
[TD="align: right"]3/2/2018 13:29[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]21[/TD]
[TD="align: right"]1984[/TD]

[TD="align: right"]2/15/2018 10:06[/TD]
[TD="align: right"]2/15/2018 10:09[/TD]
[TD="align: right"]2/15/2018 10:09[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]22[/TD]
[TD="align: right"]1983[/TD]

[TD="align: right"]2/15/2018 9:51[/TD]
[TD="align: right"]2/15/2018 11:13[/TD]
[TD="align: right"]2/19/2018 12:10[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]23[/TD]
[TD="align: right"]1982[/TD]

[TD="align: right"]2/15/2018 9:20[/TD]
[TD="align: right"]2/15/2018 10:20[/TD]
[TD="align: right"]2/19/2018 11:04[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]24[/TD]
[TD="align: right"]1634[/TD]

[TD="align: right"]12/21/2017 13:37[/TD]
[TD="align: right"]12/21/2017 14:46[/TD]
[TD="align: right"]12/25/2017 15:06[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]25[/TD]
[TD="align: right"]2091[/TD]

[TD="align: right"]3/7/2018 8:36[/TD]
[TD="align: right"]3/7/2018 8:56[/TD]
[TD="align: right"]3/7/2018 8:56[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]26[/TD]
[TD="align: right"]2009[/TD]

[TD="align: right"]2/20/2018 5:33[/TD]
[TD="align: right"]2/21/2018 5:56[/TD]
[TD="align: right"]2/25/2018 6:03[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]27[/TD]
[TD="align: right"]1995[/TD]

[TD="align: right"]2/16/2018 6:19[/TD]
[TD="align: right"]2/16/2018 9:07[/TD]
[TD="align: right"]2/20/2018 10:02[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]28[/TD]
[TD="align: right"]1951[/TD]

[TD="align: right"]2/13/2018 9:51[/TD]
[TD="align: right"]2/13/2018 10:10[/TD]
[TD="align: right"]2/17/2018 11:07[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]29[/TD]
[TD="align: right"]1946[/TD]

[TD="align: right"]2/12/2018 13:29[/TD]
[TD="align: right"]2/12/2018 14:33[/TD]
[TD="align: right"]2/16/2018 15:08[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]30[/TD]
[TD="align: right"]1869[/TD]

[TD="align: right"]1/30/2018 12:06[/TD]
[TD="align: right"]2/16/2018 14:23[/TD]
[TD="align: right"]2/20/2018 15:10[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]31[/TD]
[TD="align: right"]1855[/TD]

[TD="align: right"]1/29/2018 9:41[/TD]
[TD="align: right"]1/30/2018 12:21[/TD]
[TD="align: right"]2/3/2018 13:05[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]32[/TD]
[TD="align: right"]1845[/TD]

[TD="align: right"]1/25/2018 16:35[/TD]
[TD="align: right"]2/7/2018 13:11[/TD]
[TD="align: right"]2/11/2018 14:04[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]33[/TD]
[TD="align: right"]1835[/TD]

[TD="align: right"]1/24/2018 12:27[/TD]
[TD="align: right"]1/25/2018 8:30[/TD]
[TD="align: right"]1/29/2018 9:06[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]34[/TD]
[TD="align: right"]1693[/TD]

[TD="align: right"]1/2/2018 8:48[/TD]
[TD="align: right"]1/2/2018 9:04[/TD]
[TD="align: right"]1/6/2018 10:07[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

</tbody>
Zendesk Data

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]I2[/TH]
[TD="align: left"]=(I4-I3)*24[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]I3[/TH]
[TD="align: left"]=INDEX(D:D,MATCH(M2,C:C,0))[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]I4[/TH]
[TD="align: left"]=INDEX(E:E,MATCH(M2,C:C,0))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Your example only looks up the first client/date. Also, instead of averaging the sums you should have a column of differences and conditionally average them:


Excel 2010
ABCDEFGHIJKLMN
1idStatusOrganizationRequest dateSolved dateDiffLatest update
22100OpenClient 13/8/2018 11:42 3/8/2018 11:50Average hours to solve66.83205128ClientClient 1
32098OpenClient 13/8/2018 9:083/8/2018 9:12sum Open
42082ClosedClient 13/6/2018 10:293/6/2018 10:310.0333333333/6/2018 10:31sum Solve
52076On-holdClient 13/5/2018 13:583/6/2018 8:38
62072SolvedClient 13/5/2018 11:183/5/2018 11:350.2833333333/5/2018 11:35
72069ClosedClient 13/2/2018 10:353/6/2018 8:3894.053/6/2018 8:38
82068SolvedClient 13/2/2018 10:143/8/2018 9:19143.08333333/8/2018 9:19
92060OpenClient 13/1/2018 10:033/1/2018 10:53
102053PendingClient 12/28/2018 10:133/6/2018 7:02
112050ClosedClient 12/27/2018 12:062/27/2018 12:390.553/3/2018 13:06
122044On-holdClient 12/26/2018 17:332/27/2018 14:25
132043ClosedClient 12/26/2018 17:203/6/2018 8:38183.33/6/2018 8:38
142041PendingClient 12/26/2018 13:583/5/2018 10:28
152038On-holdClient 12/26/2018 10:273/8/2018 12:08
162037ClosedClient 12/23/2018 14:442/27/2018 12:5394.153/3/2018 13:06
172021ClosedClient 12/22/2018 7:292/23/2018 8:3525.12/27/2018 9:05
182019ClosedClient 12/20/2018 17:082/27/2018 12:53163.753/3/2018 13:06
192018ClosedClient 12/20/2018 16:452/27/2018 10:51162.13/3/2018 11:07
202007PendingClient 12/16/2018 13:063/2/2018 13:29
211984ClosedClient 12/15/2018 10:062/15/2018 10:090.052/15/2018 10:09
221983ClosedClient 12/15/2018 9:512/15/2018 11:131.3666666672/19/2018 12:10
231982ClosedClient 12/15/2018 9:202/15/2018 10:2012/19/2018 11:04
241634ClosedClient 212/21/2017 13:3712/21/2017 14:461.1512/25/2017 15:06
252091SolvedClient 23/7/2018 8:363/7/2018 8:560.3333333333/7/2018 8:56
262009ClosedClient 22/20/2018 5:332/21/2018 5:5624.383333332/25/2018 6:03
271995ClosedClient 22/16/2018 6:192/16/2018 9:072.82/20/2018 10:02
281951ClosedClient 22/13/2018 9:512/13/2018 10:100.3166666672/17/2018 11:07
291946ClosedClient 22/12/2018 13:292/12/2018 14:331.0666666672/16/2018 15:08
301869ClosedClient 21/30/2018 12:062/16/2018 14:23410.28333332/20/2018 15:10
311855ClosedClient 21/29/2018 9:411/30/2018 12:2126.666666672/3/2018 13:05
321845ClosedClient 21/25/2018 16:352/7/2018 13:11308.62/11/2018 14:04
331835ClosedClient 21/24/2018 12:271/25/2018 8:3020.051/29/2018 9:06
341693ClosedClient 21/2/2018 8:481/2/2018 9:040.2666666671/6/2018 10:07
Sheet6
Cell Formulas
RangeFormula
F2=IF(E2=0,"",24*(E2-D2))
J2=AVERAGEIF($C$2:$C$34,N2,$F$2:$F$34)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,970
Messages
6,175,699
Members
452,667
Latest member
vanessavalentino83

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