COUNTIFS with array help

kenderweasel

New Member
Joined
Feb 17, 2017
Messages
40
Hi,

I am trying to create a formula that will count the number of unique IDs associated with an interaction date where each ID can have multiple interactions per date. Any ideas on how to do this with a single formula in a table?

[TABLE="width: 439"]
<colgroup><col width="142" style="width: 107pt; mso-width-source: userset; mso-width-alt: 5193;"> <col width="111" style="width: 83pt; mso-width-source: userset; mso-width-alt: 4059;" span="4"> <tbody>[TR]
[TD="width: 142, bgcolor: red"]CustID[/TD]
[TD="width: 111, bgcolor: red"]Interaction 1[/TD]
[TD="width: 111, bgcolor: red"]Interaction 2[/TD]
[TD="width: 111, bgcolor: red"]Interaction 3[/TD]
[TD="width: 111, bgcolor: red"]Interaction 4[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]186718317248342155[/TD]
[TD="bgcolor: transparent, align: right"]03/10/2018[/TD]
[TD="bgcolor: transparent"]NULL[/TD]
[TD="bgcolor: transparent"]NULL[/TD]
[TD="bgcolor: transparent"]NULL[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]186718323715048902[/TD]
[TD="bgcolor: transparent, align: right"]04/10/2018[/TD]
[TD="bgcolor: transparent"]NULL[/TD]
[TD="bgcolor: transparent"]NULL[/TD]
[TD="bgcolor: transparent"]NULL[/TD]
[/TR]
[TR]
[TD="bgcolor: yellow"]186718334363875422[/TD]
[TD="bgcolor: yellow, align: right"]04/10/2018[/TD]
[TD="bgcolor: yellow, align: right"]04/10/2018[/TD]
[TD="bgcolor: yellow, align: right"]04/10/2018[/TD]
[TD="bgcolor: yellow"]NULL[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]186718335685871159[/TD]
[TD="bgcolor: transparent, align: right"]07/10/2018[/TD]
[TD="bgcolor: transparent"]NULL[/TD]
[TD="bgcolor: transparent"]NULL[/TD]
[TD="bgcolor: transparent"]NULL[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]186718338800604518[/TD]
[TD="bgcolor: transparent, align: right"]04/10/2018[/TD]
[TD="bgcolor: transparent, align: right"]04/10/2018[/TD]
[TD="bgcolor: transparent"]NULL[/TD]
[TD="bgcolor: transparent"]NULL[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]186718339338591264[/TD]
[TD="bgcolor: transparent, align: right"]05/10/2018[/TD]
[TD="bgcolor: transparent"]NULL[/TD]
[TD="bgcolor: transparent"]NULL[/TD]
[TD="bgcolor: transparent"]NULL[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]186718350455888328[/TD]
[TD="bgcolor: transparent, align: right"]04/10/2018[/TD]
[TD="bgcolor: transparent"]NULL[/TD]
[TD="bgcolor: transparent"]NULL[/TD]
[TD="bgcolor: transparent"]NULL[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]186718350530861890[/TD]
[TD="bgcolor: transparent, align: right"]03/10/2018[/TD]
[TD="bgcolor: transparent"]NULL[/TD]
[TD="bgcolor: transparent"]NULL[/TD]
[TD="bgcolor: transparent"]NULL[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]186718350747787245[/TD]
[TD="bgcolor: transparent, align: right"]03/10/2018[/TD]
[TD="bgcolor: transparent, align: right"]05/10/2018[/TD]
[TD="bgcolor: transparent, align: right"]05/10/2018[/TD]
[TD="bgcolor: transparent, align: right"]05/10/2018[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]186718350985618728[/TD]
[TD="bgcolor: transparent, align: right"]04/10/2018[/TD]
[TD="bgcolor: transparent"]NULL[/TD]
[TD="bgcolor: transparent"]NULL[/TD]
[TD="bgcolor: transparent"]NULL[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]186718351911846166[/TD]
[TD="bgcolor: transparent, align: right"]07/10/2018[/TD]
[TD="bgcolor: transparent, align: right"]07/10/2018[/TD]
[TD="bgcolor: transparent, align: right"]07/10/2018[/TD]
[TD="bgcolor: transparent"]NULL[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
[TABLE="class: head"]
<tbody>[TR="bgcolor: #888888"]
[TH][/TH]
[TH]
A
[/TH]
[TH]
B
[/TH]
[TH]
C
[/TH]
[TH]
D
[/TH]
[TH]
E
[/TH]
[TH]
F
[/TH]
[TH]
G
[/TH]
[TH]
H
[/TH]
[TH]
I
[/TH]
[TH]
J
[/TH]
[TH]
K
[/TH]
[TH]
L
[/TH]
[TH]
M
[/TH]
[/TR]
[TR="bgcolor: #FFFFFF"]
[TD="bgcolor: #888888"]
1
[/TD]
[TD]CustID[/TD]
[TD]Interaction 1[/TD]
[TD]Interaction 2[/TD]
[TD]Interaction 3[/TD]
[TD]Interaction 4[/TD]
[TD][/TD]
[TD][/TD]
[TD]COUNT[/TD]
[TD]Interaction 1[/TD]
[TD]Interaction 2[/TD]
[TD]Interaction 3[/TD]
[TD]Interaction 4[/TD]
[TD][/TD]
[/TR]
[TR="bgcolor: #FFFFFF"]
[TD="bgcolor: #888888"]
2
[/TD]
[TD]
186718317248342000​
[/TD]
[TD]
3/10/2018​
[/TD]
[TD]NULL[/TD]
[TD]NULL[/TD]
[TD]NULL[/TD]
[TD][/TD]
[TD][/TD]
[TD]
2​
[/TD]
[TD]
3/10/2018​
[/TD]
[TD]NULL[/TD]
[TD]NULL[/TD]
[TD]NULL[/TD]
[TD][/TD]
[/TR]
[TR="bgcolor: #FFFFFF"]
[TD="bgcolor: #888888"]
3
[/TD]
[TD]
186718323715048000​
[/TD]
[TD]
4/10/2018​
[/TD]
[TD]NULL[/TD]
[TD]NULL[/TD]
[TD]NULL[/TD]
[TD][/TD]
[TD][/TD]
[TD]
3​
[/TD]
[TD]
4/10/2018​
[/TD]
[TD]NULL[/TD]
[TD]NULL[/TD]
[TD]NULL[/TD]
[TD][/TD]
[/TR]
[TR="bgcolor: #FFFFFF"]
[TD="bgcolor: #888888"]
4
[/TD]
[TD]
186718334363875000​
[/TD]
[TD]
4/10/2018​
[/TD]
[TD]
4/10/2018​
[/TD]
[TD]
4/10/2018​
[/TD]
[TD]NULL[/TD]
[TD][/TD]
[TD][/TD]
[TD]
1​
[/TD]
[TD]
4/10/2018​
[/TD]
[TD]
4/10/2018​
[/TD]
[TD]
4/10/2018​
[/TD]
[TD]NULL[/TD]
[TD][/TD]
[/TR]
[TR="bgcolor: #FFFFFF"]
[TD="bgcolor: #888888"]
5
[/TD]
[TD]
186718335685871000​
[/TD]
[TD]
7/10/2018​
[/TD]
[TD]NULL[/TD]
[TD]NULL[/TD]
[TD]NULL[/TD]
[TD][/TD]
[TD][/TD]
[TD]
1​
[/TD]
[TD]
7/10/2018​
[/TD]
[TD]NULL[/TD]
[TD]NULL[/TD]
[TD]NULL[/TD]
[TD][/TD]
[/TR]
[TR="bgcolor: #FFFFFF"]
[TD="bgcolor: #888888"]
6
[/TD]
[TD]
186718338800604000​
[/TD]
[TD]
4/10/2018​
[/TD]
[TD]
4/10/2018​
[/TD]
[TD]NULL[/TD]
[TD]NULL[/TD]
[TD][/TD]
[TD][/TD]
[TD]
1​
[/TD]
[TD]
4/10/2018​
[/TD]
[TD]
4/10/2018​
[/TD]
[TD]NULL[/TD]
[TD]NULL[/TD]
[TD][/TD]
[/TR]
[TR="bgcolor: #FFFFFF"]
[TD="bgcolor: #888888"]
7
[/TD]
[TD]
186718339338591000​
[/TD]
[TD]
5/10/2018​
[/TD]
[TD]NULL[/TD]
[TD]NULL[/TD]
[TD]NULL[/TD]
[TD][/TD]
[TD][/TD]
[TD]
1​
[/TD]
[TD]
5/10/2018​
[/TD]
[TD]NULL[/TD]
[TD]NULL[/TD]
[TD]NULL[/TD]
[TD][/TD]
[/TR]
[TR="bgcolor: #FFFFFF"]
[TD="bgcolor: #888888"]
8
[/TD]
[TD]
186718350455888000​
[/TD]
[TD]
4/10/2018​
[/TD]
[TD]NULL[/TD]
[TD]NULL[/TD]
[TD]NULL[/TD]
[TD][/TD]
[TD][/TD]
[TD]
1​
[/TD]
[TD]
3/10/2018​
[/TD]
[TD]
5/10/2018​
[/TD]
[TD]
5/10/2018​
[/TD]
[TD]
5/10/2018​
[/TD]
[TD][/TD]
[/TR]
[TR="bgcolor: #FFFFFF"]
[TD="bgcolor: #888888"]
9
[/TD]
[TD]
186718350530861000​
[/TD]
[TD]
3/10/2018​
[/TD]
[TD]NULL[/TD]
[TD]NULL[/TD]
[TD]NULL[/TD]
[TD][/TD]
[TD][/TD]
[TD]
1​
[/TD]
[TD]
7/10/2018​
[/TD]
[TD]
7/10/2018​
[/TD]
[TD]
7/10/2018​
[/TD]
[TD]NULL[/TD]
[TD][/TD]
[/TR]
[TR="bgcolor: #FFFFFF"]
[TD="bgcolor: #888888"]
10
[/TD]
[TD]
186718350747787000​
[/TD]
[TD]
3/10/2018​
[/TD]
[TD]
5/10/2018​
[/TD]
[TD]
5/10/2018​
[/TD]
[TD]
5/10/2018​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR="bgcolor: #FFFFFF"]
[TD="bgcolor: #888888"]
11
[/TD]
[TD]
186718350985618000​
[/TD]
[TD]
4/10/2018​
[/TD]
[TD]NULL[/TD]
[TD]NULL[/TD]
[TD]NULL[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR="bgcolor: #FFFFFF"]
[TD="bgcolor: #888888"]
12
[/TD]
[TD]
186718351911846000​
[/TD]
[TD]
7/10/2018​
[/TD]
[TD]
7/10/2018​
[/TD]
[TD]
7/10/2018​
[/TD]
[TD]NULL[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


H2=IF(ROWS($H$2:H2)<=ROWS($I$2:$I$9),SUM(IF(FREQUENCY(IF($B$2:$B$12&$C$2:$C$12&$D$2:$D$12&$E$2:$E$12=I2&J2&K2&L2,MATCH($A$2:$A$12,$A$2:$A$12,0)),ROW($A$2:$A$12)-ROW($A$2)+1),1)),"") control+shift+enter copy down
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,270
Members
452,628
Latest member
dd2

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