Count specific values within subgroups of groups

Ken Soona

New Member
Joined
Feb 19, 2014
Messages
29
Hello everyone,

I am having trouble with counting instances where a specific value appears within a subgroup of a group.

An example of the data are below:

GROUPIDDATA
11Main St
111st St
12Main St
12
21Main St
21Main St
21
221st St
22

<tbody>
</tbody>

Context:
I am resolving duplicates within my data, there are instances where the same person has two separate IDs and records. I ran an automated check to ID possible duplicates, which are tagged by the GROUP field; the ID field are the individual ID numbers. Address information is a very easy way to pick out duplicates.

I need to write something which does the following:

For each GROUP number, look at all the unique IDs within. For each unique ID within a group, look to see if the address in the DATA field appears for any other of the unique IDs within the group. If so, mark it 1 / TRUE / etc.

I have written a COUNTIFS formula that gets most of the way there, but it does not exclude the row of the formula.

It is COUNTIFS(A:A,A2, B:B,"<>&", C:C,C2)

It should, for group 1 row 2, produce a 1, b/c Main Street appears in Group1 ID1, and also 1x in Group1 ID2. I cannot get it to ignore row 2, I am stuck with the formula giving me a 2 for a result, b/c Main Street appears twice in Group1.

Any help is appreciated.

Thank you!
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
A
B
C
D
1
GROUPIDDATAFormula
2
1​
1​
Main St
1​
3
1​
1​
1st St
1​
4
1​
2​
Main St
1​
5
1​
2​
0​
6
2​
1​
Main St
2​
7
2​
1​
Main St
2​
8
2​
1​
0​
9
2​
2​
1st St
1​
10
2​
2​
0​
Sheet: Sheet74

Formula in cell D2:
=COUNTIFS($A$2:$A$10,A2,$B$2:$B$10,B2,$C$2:$C$10,C2)
 
Upvote 0

Forum statistics

Threads
1,215,143
Messages
6,123,280
Members
449,094
Latest member
GoToLeep

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