Chris Rosendin
Chris Rosendin

Reputation: 367

How to use COUNTUNIQUEIFS in Goole sheets with an OR condition where a cell can meets two conditions

I'm trying to find the count of unique rows that meet multiple criteria in sheets. Data is like this:

ID |TYPE
1  |T1;T2;T3
2  |T1;T7
3  |T2;T3
4  |T6

I want a count of IDs where type is either T1 or T2. The right answer is 3 (ids 1,2 and 3 have either target type)

=countuniqueifs(A:A,B:B,{"*t1*","*t2*"}) 

gives me an answer of 2.

Any help greatly apprciated.

Upvotes: 2

Views: 6035

Answers (1)

player0
player0

Reputation: 1

try:

=COUNTUNIQUE(IFNA(FILTER(A2:A, REGEXMATCH(B2:B, "T1|T2"))))

enter image description here


to avoid T11 count in when the criterion is T1:

0

Upvotes: 5

Related Questions