A simple count of unique values without taking any criteria into account you can find here. But what if you have some criteria and you do not want to rearrange your spreadsheet so that it shows only relevant data?
One option might be a Pivot table with a helper column. Personally I would prefer two subsequent Pivot tables.
Another option is using the advanced filter.
The two options I would like to present here are a worksheet formula approach and a VBA approach, though. This is because I think it is worth to learn from the pitfalls of the suboptimal worksheet formula.
Let us assume you have a company in 10 regions with 200 employees who are selling some goods each day. And now you want to know how many (unique) employees per region sold anything in the first quarter of 2010.
We have the sales data in sheet Data:
