How can I use the COUNTIFS function in excel to count the number of cells that meet multiple criteria simultaneously?

How can I use the COUNTIFS function in excel to count the number of cells that meet multiple criteria simultaneously?

The COUNTIFS function in Excel allows users to count the number of cells that meet multiple criteria at the same time. This function is helpful in situations where there are multiple conditions that need to be met in order for a cell to be counted. By using the COUNTIFS function, users can efficiently and accurately calculate the number of cells that meet all of the specified criteria, providing a more precise and organized analysis of their data. This feature is particularly useful for analyzing large datasets and making data-driven decisions. To use the COUNTIFS function, users simply need to input the criteria they want to count and the range of cells to be evaluated, allowing for a quick and effective way to gather important information from their data.

The COUNTIFS function applies criteria to cells across multiple ranges and counts the number of times all criteria are met.

Your browser does not support video. Install Microsoft Silverlight, Adobe Flash Player, or Internet Explorer 9.

This video is part of a training course called Advanced IF functions.

Syntax

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

The COUNTIFS function syntax has the following arguments:

  • criteria_range1    Required. The first range in which to evaluate the associated criteria.

  • criteria1    Required. The criteria in the form of a number, expression, cell reference, or text that define which cells will be counted. For example, criteria can be expressed as 32, “>32”, B4, “apples”, or “32”.

  • criteria_range2, criteria2, …    Optional. Additional ranges and their associated criteria. Up to 127 range/criteria pairs are allowed.

Important: Each additional range must have the same number of rows and columns as the criteria_range1 argument. The ranges do not have to be adjacent to each other.

Remarks

  • Each range’s criteria is applied one cell at a time. If all of the first cells meet their associated criteria, the count increases by 1. If all of the second cells meet their associated criteria, the count increases by 1 again, and so on until all of the cells are evaluated.

  • If the criteria argument is a reference to an empty cell, the COUNTIFS function treats the empty cell as a 0 value.

  • You can use the wildcard characters— the question mark (?) and asterisk (*) — in criteria. A question mark matches any single character, and an asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) before the character.

Example 1

Copy the example data in the following tables, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data.

Salesperson

Exceeded Q1 quota

Exceeded Q2 quota

Exceeded Q3 quota

Davidoski

Yes

No

No

Burke

Yes

Yes

No

Sundaram

Yes

Yes

Yes

Levitan

No

Yes

Yes

Formula

Description

Result

=COUNTIFS(B2:D2,”=Yes”)

Counts how many times Davidoski exceeded a sales quota for periods Q1, Q2, and Q3 (only in Q1).

1

=COUNTIFS(B2:B5,”=Yes”,C2:C5,”=Yes”)

Counts how many salespeople exceeded both their Q1 and Q2 quotas (Burke and Sundaram).

2

=COUNTIFS(B5:D5,”=Yes”,B3:D3,”=Yes”)

Counts how many times Levitan and Burke exceeded the same quota for periods Q1, Q2, and Q3 (only in Q2).

1

Need more help?

You can always ask an expert in the Excel Tech Community or get support in Communities.

See Also

To count cells that aren’t blank, use the COUNTA function

To count cells using a single criteria, use the COUNTIF function

The SUMIF function adds only the values that meet a single criteria

The SUMIFS function adds only the values that meet multiple criteria

IFS function (Microsoft 365, Excel 2016 and later)

Overview of formulas in Excel

How to avoid broken formulas

Detect errors in formulas

Statistical functions

Excel functions (alphabetical)

Excel functions (by Category)

Cite this article

stats writer (2024). How can I use the COUNTIFS function in excel to count the number of cells that meet multiple criteria simultaneously?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-use-the-countifs-function-in-excel-to-count-the-number-of-cells-that-meet-multiple-criteria-simultaneously/

stats writer. "How can I use the COUNTIFS function in excel to count the number of cells that meet multiple criteria simultaneously?." PSYCHOLOGICAL SCALES, 29 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-use-the-countifs-function-in-excel-to-count-the-number-of-cells-that-meet-multiple-criteria-simultaneously/.

stats writer. "How can I use the COUNTIFS function in excel to count the number of cells that meet multiple criteria simultaneously?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-use-the-countifs-function-in-excel-to-count-the-number-of-cells-that-meet-multiple-criteria-simultaneously/.

stats writer (2024) 'How can I use the COUNTIFS function in excel to count the number of cells that meet multiple criteria simultaneously?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-use-the-countifs-function-in-excel-to-count-the-number-of-cells-that-meet-multiple-criteria-simultaneously/.

[1] stats writer, "How can I use the COUNTIFS function in excel to count the number of cells that meet multiple criteria simultaneously?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.

stats writer. How can I use the COUNTIFS function in excel to count the number of cells that meet multiple criteria simultaneously?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.

Download Post (.PDF)
Slide Up
x
PDF
Scroll to Top