How can I count a column in Google Sheets if another column meets certain criteria?

To count a column in Google Sheets based on certain criteria in another column, you can use the COUNTIF function. This function allows you to specify a range of cells to check and a criteria to match. For example, if you want to count the number of cells in column A that contain the word “apple” in column B, you would use the formula =COUNTIF(B:B,”apple”). This will return the total number of cells in column A that meet the criteria of having “apple” in the corresponding cell in column B. This can be helpful for tracking data and analyzing trends in your spreadsheet.


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:

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 .

Additional Resources

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

x