Running unique count of occurrence on table based on date

Minx_Minxy

New Member
Joined
Jul 13, 2015
Messages
37
Office Version
  1. 365
Platform
  1. Windows
Hello, I have a report that is extracted daily Mon-Fri. I want to show the unique ticket number (because sometimes is duplicated) that is overdue on the day I extract the report and how many day(s) that ticket has been in the inbox and do that for the subsequent days.

Examples:

1) Overdue ticket #12345 was in the inbox on the 29/01/24 so days in inbox = 1 and then on 30/01/24 the ticket is still in the inbox so days in inbox = 2.
2) The ticket # 54321 was in the inbox on the 10/01/24 and was overdue so days in inbox =1 and then ticket shows up on report again on the 29/01/24, then days in inbox = 2
3) Ticket # 56789 arrived on inbox 18/12/23 overdue and it has been in the inbox up until the 29/01/24

here is what I have so far:


Book2.xlsx
ABCDEFGHIJKLMNOPQRSTUV
1MondayDays In InboxWhat I wantDays OverdueTuesdayDays In InboxWhat I wantDays OverdueWednesdayDays In InboxWhat I wantDays OverdueThursdayDays In InboxDays OverdueFridayDays In InboxDays Overdue29/01/2024
2501937031-1501937032-2501937033-301 01 30/01/2024
3505405275-46505405276-47505405277-4831/01/2024
4505398875-54505398876-55505398877-5601/02/2024
5505398475-58505398476-59505398477-6002/02/2024
6505144622-130505144821-31505144822-32
7496480275-43496480276-44490989988-72
8506098421-30496462176-71496480277-45
9505794121-89506098422-31496462177-72
10500416397-11505794122-90500416399-13
11499484344-313500416398-1249171472929-62
12498702844-5749171472928-6149099041010-72
1349171472927-604909904109-7148262942929-402
144909904108-7048262942928-401505373522-5
1548262942927-40049806612626-31505637744-12
1649806612625-30505373521-4505373633-5
17506276811-29505637743-1149782662929-66
18505637742-10505373632-449294162929-59
19505373631-349782662928-650
2049782662927-6449294162928-58
2149294162927-570
220
23
24
25
26
27
Table
Cell Formulas
RangeFormula
A2:A22A2=UNIQUE(FILTER(Data!$B:$B,Data!$A:$A=V1*(Data!$D:$D="X")))
E2:E21E2=UNIQUE(FILTER(Data!$B:$B,Data!$A:$A=V2*(Data!$D:$D="X")))
I2:I19I2=UNIQUE(FILTER(Data!$B:$B,Data!$A:$A=V3*(Data!$D:$D="X")))
M2M2=UNIQUE(FILTER(Data!$B:$B,Data!$A:$A=V4*(Data!$D:$D="X")))
N2,Q2,B2:B21,F2:F20,J2:J18N2=SUM(IF(FREQUENCY(IF(Data!$B:$B=M2,Data!$A:$A),Data!$A:$A)>0,1))
O2O2=IFERROR(VLOOKUP($V$4&M2,CHOOSE({1,2},Data!$A:$A&Data!$B:$B,Data!$C:$C),2,FALSE),"")
P2P2=UNIQUE(FILTER(Data!$B:$B,Data!$A:$A=V5*(Data!$D:$D="X")))
R2R2=IFERROR(VLOOKUP($V$5&P2,CHOOSE({1,2},Data!$A:$A&Data!$B:$B,Data!$C:$C),2,FALSE),"")
V1V1=TODAY()-WEEKDAY(TODAY(),3)
V2:V5V2=V1+1
L2:L18L2=IFERROR(VLOOKUP($V$3&I2,CHOOSE({1,2},Data!$A:$A&Data!$B:$B,Data!$C:$C),2,FALSE),"")
H2:H20H2=IFERROR(VLOOKUP($V$2&E2,CHOOSE({1,2},Data!$A:$A&Data!$B:$B,Data!$C:$C),2,FALSE),"")
D2:D21D2=IFERROR(VLOOKUP($V$1&A2,CHOOSE({1,2},Data!$A:$A&Data!$B:$B,Data!$C:$C),2,FALSE),"")
Dynamic array formulas.
Named Ranges
NameRefers ToCells
Data!_FilterDatabase=Data!$A$1:$D$1032J2:J18, B2:B21, F2:F20, L2:L18, A2, D2:D21, E2, H2:H20, I2, M2:R2






The formula I have in column J works perfectly, but not for the other columns. On columns B,F & J the numbers is always the same. In columns C,G and K, I've added what I want the formula to show.

I just need to keep a Monday to Friday report so weekend dates won't be on the report.


This is a simplified sample of the master data.

Book2.xlsx
ABCD
1Extraction DateTkt IDDays to DueOverdue
229-Jan5019370-1X
329-Jan5019370-1X
429-Jan5054052-46X
529-Jan5053988-54X
629-Jan5053984-58X
729-Jan4964802-43X
829-Jan4964802-43X
929-Jan5060984-30X
1029-Jan5004163-11X
1129-Jan4994843-313X
1229-Jan4987028-57X
1329-Jan4826294-400X
1429-Jan4980661-30X
1529-Jan4980661-30X
1629-Jan5056377-10X
1729-Jan5053736-3X
1829-Jan4978266-64X
1929-Jan4929416-57X
2030-Jan5019370-2X
2130-Jan5019370-2X
2230-Jan5054052-47X
2330-Jan5053988-55X
2430-Jan5053984-59X
2530-Jan5051448-31X
2630-Jan4964802-44X
2730-Jan4964802-44X
2830-Jan4964621-71X
2930-Jan4964621-71X
3030-Jan5060984-31X
3130-Jan5004163-12X
3230-Jan4917147-61X
3330-Jan4909904-71X
3430-Jan4826294-401X
3530-Jan4980661-31X
3630-Jan4980661-31X
3730-Jan5053735-4X
3830-Jan5056377-11X
3930-Jan5053736-4X
4030-Jan4978266-65X
4130-Jan4929416-58X
Sheet5




Any thoughts would be very helpful. Thank you
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

Forum statistics

Threads
1,223,888
Messages
6,175,203
Members
452,617
Latest member
Narendra Babu D

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