COUNTIF with multiple criteria

2019-06-28 07:29发布

问题:

Can you please advise on how can I use COUNTIF with multiple conditions?

My proposal (left) shows the formula for one criterion (distinct regions).

However, I am interested in counting distinct regions for each distinct month (two criteria) - on the right: desired result.

回答1:

you can use COUNTIFS instead

=1/COUNTIFS($A:$A,A2,$B:$B,B2)