COUNTIFS Function
COUNTIFS is an extension of the COUNTIF function that enables you to count values in multiple ranges using multiple criteria to determine what values to count.
Syntax
COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2]…)
Arguments
Argument
Description
criteria_range1
Required. The first range you want to evaluate using the associated criteria, which is criteria1.
criteria1
Required. This is the first criteria and it pairs with criteria_range1. It could be a number, cell reference, expression, or text that define which cells will be counted. For example, criteria can be expressed as 40, ">=40", D10, "bolts", or "40".
criteria_range2, criteria2, ...
Optional. Additional ranges and criteria pairs. You can have a total of 127 range/criteria pairs.
A couple of points to take into consideration when using COUNTIFS:
Example
In the following example, we want to count the number of people for each state with 40 or more orders. This problem requires us to use two criteria to evaluate two columns. We will be using the state name and “>=40” to determine which records meet our criteria.
We apply the following formula to solve the problem:
=COUNTIFS($B$2:$B$12,F2,$C$2:$C$12,G2)
Formula explanation:
=COUNTIFS($B$2:$B$12,F2,$C$2:$C$12,G2)
We enter the formula in cell H2 and then copy it down the column to count the number of people with orders that match the criteria for each state.