Count Unique values with a condition
Assuming no more than 100 rows try this “array formula” to count the different names in A2:A100 where there is a 1 in the same row in B2:B100: =SUM(IF(FREQUENCY(IF(B2:B100=1,IF(A2:A100<>””,MATCH(A2:A100,A2:A100,0))),ROW(A2:A100)-ROW(A2)+1),1)) confirmed with CTRL+SHIFT+ENTER Note that I say different not unique as the two are not the same