Google Sheets: Count Column if Another Column Meets Criteria


You can use the COUNTIF and COUNTIFS functions in Google Sheets to count the number of values in one column where the value in another column meets specific criteria.

The following examples show how to use these functions in practice with the following dataset in Google Sheets:

Let’s jump in!

Example 1: Use COUNTIF to Count One Column if Another Column Meets Criteria

Suppose we would like to count the number of cells in the Player column where the corresponding cell in the Team column is equal to Mavs.

We can type the following formula into cell F2 to do so:

=COUNTIF(A2:A11, F1)

The following screenshot shows how to use this formula in practice:

Google Sheets count column if another column meets criteria

From the output we can see that there are 4 cells in the Player column where the corresponding cell in the Team column is Mavs.

Example 2: Use COUNTIFS to Count One Column if Multiple Other Columns Meet Criteria

Suppose we would like to count the number of cells in the Player column where the corresponding cell in the Team column is equal to Mavs and the corresponding cell in the Points column is greater than 20.

We can type the following formula into cell F3 to do so:

=COUNTIFS(A2:A11, F1, C2:C11, ">"&F2)

The following screenshot shows how to use this formula in practice:

From the output we can see that there are 2 cells in the Player column where the corresponding cell in the Team column is Mavs and the corresponding cell in the Points column is greater than 20.

Note #1: In this example we used the COUNTIFS function to check if two columns met specific criteria, but you can use the COUNTIFS function to check if as many columns as you’d like meet specific criteria.

Note #2: You can find the complete documentation for the Google Sheets COUNTIFS function here.

Additional Resources

The following tutorials explain how to perform other common operations in Google Sheets:

Google Sheets: How to Use VLOOKUP with COUNTIF
Google Sheets: How to Use Case Sensitive COUNTIF
Google Sheets: COUNTIF Greater Than But Less Than Some Number

One Reply to “Google Sheets: Count Column if Another Column Meets Criteria”

  1. Hello there. Thanks for this post about countifs. But I have a question, from your Mavs, points example. What if wanted to count the total points scored by Mavs players. That is, I want to sum the C columns, but only those cells where the A column corresponding cell is “Mavs”. 86 points where scored by Mavs players. How the formula would be?

Leave a Reply

Your email address will not be published. Required fields are marked *