Table of Contents
The COUNTIFS function in Excel is a powerful tool that allows users to count values across multiple columns in a spreadsheet. This function is particularly useful for analyzing large data sets and identifying specific criteria within the data. By specifying multiple criteria, the COUNTIFS function can count the number of cells that meet all of the specified conditions. This allows for a more precise and comprehensive analysis of data. To use the COUNTIFS function, the user must specify the range of cells to be counted and the criteria to be met. This function can greatly improve efficiency and accuracy in data analysis and is a valuable tool for any Excel user.
Excel: Use COUNTIFS to Count Across Multiple Columns
You can use the COUNTIFS function in Excel to count the number of rows that meet criteria across multiple columns.
Here are three common ways to use the COUNTIFS function across multiple columns:
Method 1: Use COUNTIFS Across Multiple Columns with AND Logic
=COUNTIFS(A2:A11, "Mavs", B2:B11, "Guard", C2:C11, ">15")
This particular formula counts the number of rows where the value in A2:A11 is equal to “Mavs” and the value in B2:B11 is equal to “Guard” and the value in C2:C11 is greater than 15.
Method 2: Use COUNTIFS Across Multiple Columns with OR Logic
=COUNTIFS(A2:A11, "Mavs")+COUNTIFS(A2:A11, "<>Mavs", B2:B11, "Guard")
This particular formula counts the number of rows where the value in A2:A11 is equal to “Mavs” or the value in B2:B11 is equal to “Guard”.
Method 3: Use COUNTIFS Across Multiple Columns with Both AND / OR Logic
=COUNTIFS(A2:A11, "Mavs", B2:B11, "Guard") + COUNTIFS(A2:A11, "Spurs", B2:B11, "Center")
This particular formula counts the number of rows where the value in A2:A11 is “Mavs” and the value in B2:B11 is “Guard” or where the value in A2:A11 is “Spurs” and the value in B2:B11 is Center”.
The following examples show how to use each method in practice with the following dataset in Excel that contains information about various basketball players:

Example 1: Use COUNTIFS Across Multiple Columns with AND Logic
We can type the following formula into cell D2 to count the number of rows where the team is “Mavs” and the position is “Guard” and the points value is greater than 15:
=COUNTIFS(A2:A11, "Mavs", B2:B11, "Guard", C2:C11, ">15")
The following screenshot shows how to use this formula in practice:

The total number of players that meet these three criteria is 1.
Specifically, we can see that the player in row number 3 is the only player to meet all three of these criteria.
Example 2: Use COUNTIFS Across Multiple Columns with OR Logic
We can type the following formula into cell D2 to count the number of rows where the team is “Mavs” or the position is “Guard:
=COUNTIFS(A2:A11, "Mavs")+COUNTIFS(A2:A11, "<>Mavs", B2:B11, "Guard")
The following screenshot shows how to use this formula in practice:

The total number of players that meet these three criteria is 7.
Note: In the second COUNTIFS function we had to specify that the team should not be equal to “Mavs” so that we didn’t double count the guards on the Mavs team.
Example 3: Use COUNTIFS Across Multiple Columns with Both AND / OR Logic
We can type the following formula into cell D2 to count the number of rows where the player is a Mavs Guard or a Spurs Center:
=COUNTIFS(A2:A11, "Mavs", B2:B11, "Guard") + COUNTIFS(A2:A11, "Spurs", B2:B11, "Center")
The following screenshot shows how to use this formula in practice:

The total number of players that meet these three criteria is 3.
The following tutorials explain how to perform other common tasks in Excel:
Cite this article
stats writer (2024). How can I use the COUNTIFS function in Excel to count values across multiple columns?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-use-the-countifs-function-in-excel-to-count-values-across-multiple-columns/
stats writer. "How can I use the COUNTIFS function in Excel to count values across multiple columns?." PSYCHOLOGICAL SCALES, 22 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-use-the-countifs-function-in-excel-to-count-values-across-multiple-columns/.
stats writer. "How can I use the COUNTIFS function in Excel to count values across multiple columns?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-use-the-countifs-function-in-excel-to-count-values-across-multiple-columns/.
stats writer (2024) 'How can I use the COUNTIFS function in Excel to count values across multiple columns?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-use-the-countifs-function-in-excel-to-count-values-across-multiple-columns/.
[1] stats writer, "How can I use the COUNTIFS function in Excel to count values across multiple columns?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.
stats writer. How can I use the COUNTIFS function in Excel to count values across multiple columns?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
