This is my data sample:
What I'm trying to do with a formula is to count the number of employees in column D of my table in relation with the data in my column B. If there are duplicates in B, the formula should count the different names in D as 1. In my data sample, I've highlighted in green the ones that should be counted to help with comprehension.
As you can see, the count ($G$4) should be 7. In this situation, the cell D10 is not counted as B9+D9 and B10+D10 are perfect duplicates. Therefore only counted once. And while B5 and B6 are duplicate case file number, D5 and D6 are different, and therefore it is counted twice.
I suppose this would require a variation of the COUNTIF formula, but for the life of me I can't seem to get it right.
English is my second language, but I've tried to be as clear as possible.
I work with Excel 2010.
Thank you!!


7your picture shows7but your words say6, which is the correct answer?