See attached.
I have a table with location, name and condition (category) fields. On the next sheet, I have a working formula to calculate the number of distinct names (don't count repeated names within the same location) for each location in column B.
What I need next is a formula to calculate the same (number of distinct names), but only count IF at least 1 of the corresponding names also has category 'B' - the group of names may have more than one 'B', but is only counted once. I think I have that formula correct in column C (gray highlight), but you can double check (thank you). Finally, and this is where I know my formula is incorrect (light blue highlight), a distinct name count where ALL the names are category 'A' (no 'Bs' or any other category - my sample only has 2 categories, but my actual data set has a few more categories).
Sample C.xlsx
EDIT - posted in correct forum with correct attachment.
Bookmarks