COUNTIFS(criteria_range1, criteria1 [,criteria_range2, criteria2] [..])

Returns the number of non blank cells that satisfies multiple conditions.

criteria_range1The range of cells you want evaluated.
criteria1The expression that contains the criteria.
criteria_range2(Optional) The range of cells you want evaluated.
criteria2(Optional) The expression that contains the criteria.

Remarks

* Added in Excel 2007.
* This function includes hidden rows.
* For an illustrated example refer to the page under Advanced Functions.
* This function uses the actual cell values and not the displayed formatted values.
* Every additional range must have the same number of rows and columns as "criteria_range1".
* Any empty cells are considered equivalent to a 0 value.
* You can use wildcard characters (?) and (*).
* You can use the COUNT function to return the number of non blank cells with no conditions.
* You can use the COUNTA function to include logical values and text.
* You can use the COUNTIF function to satisfy one condition.
* This is similar to the AVERAGEIFS function.
* This is similar to the MAXIFS function.
* This is similar to the MINIFS function.
* This is similar to the SUMIFS function.
* For the Microsoft documentation refer to support.office.com

 ABC
1=COUNTIFS(B1:B5,"Barry") = 2Barry30
2=COUNTIFS(B1:B5,"=Barry") = 2Simon40
3=COUNTIFS(B1:B5,"=Simon") = 1Barry20
4=COUNTIFS(B1:B5,"Barry",C1:C5,"<>20") = 1James60
5=COUNTIFS(B1:B5,"Barry",C1:C5,"=20") = 1David80
6=COUNTIFS(B1:B5,"Barry",C1:C5,">"&C3) = 1  

1 - What is the number of cells that have "Barry" in the range "B1:B5".
2 - What is the number of cells that have "Barry" in the range "B1:B5". Notice that prefixing the condition with an equal sign means the same thing.
3 - What is the number of cells that have "Simon" in the range "B1:B5".
4 - What is the number of cells that have "Barry" in the range "B1:B5" and have a value not equal to 20 in the range "C1:C5".
5 - What is the number of cells that have "Barry" in the range "B1:B5" and have a value equal to 20 in the range "C1:C5".
6 - What is the number of cells that have "Barry" in the range "B1:B5" and have a value greater than the value in cell "C3" in the range "C1:C5".

© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited Top