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.
Using COUNTIF with multiple criteria. The best function you can use for situations when you need to count cells based on multiple criteria is the COUNTIFS function. The “s” on the end of Countif makes it plural, and that means that there are multiple criteria.
#3 Count Cells with Multiple Criteria – Between Two DatesTo get a count of values between two values, we need to use multiple criteria in the COUNTIF function. We can do this using two methods – One single COUNTIFS function or two COUNTIF functions.
Additional ranges and their associated criteria. Up to 127 range/criteria pairs are allowed.
If there are more than two criteria that you want to count in one column, just use =COUNTIF(range1, criteria1) + COUNTIF(range2, criteria2) + COUNTIF(range3, criteria3)+…
you can use COUNTIFS()
instead
=1/COUNTIFS($A:$A,A2,$B:$B,B2)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With