# COUNTIF Contains X in Google Sheets (Easiest Way in 2024)

May 8, 2024

In this article we will show how to COUNTIF a sheet contains a specified value in Google Sheets. Simply follow the steps below:

## COUNTIF Contains in Google Sheets

### 1.Select an empty cell

For our example, we will count the number cells that contain the number 1 in our Google Sheet workbook. We’ll select cell D2.

### 2. Enter the COUNTIF Formula in a Blank Cell

The basic syntax for the COUNTIF function in Google Sheets is:

=COUNTIF(range, criterion)

Formula Breakdown:

Range: The range of cells to count. In our example our range will be from A1:A50.

Criterion: This is the value you want to count. For our example we want to count all cells in the range that contain the number 1.

Remember to type a comma "," to separate the first argument from the second argument.

In our example the formula will be: =countif(A1:A50,1).

### 3. Press Enter to See The Result

Now you’ll be able to count all cells in your range that contain the value 1. We can that from the 50 cells, there are 7 cells that fall within our criteria.

This is how simple it is to use COUNTIF to count specific values in Google Sheets.

If you want to learn how to count specific text, check out our article about the COUNTIF function for counting specific text.

If you enjoyed this article, you might also like our article on how to use COUNTIF multiple criteria in Google Sheets or our article on how to use COUNTIFS in Google Sheets.

If you want to learn how to send emails based on dates in Google Sheets, we also suggest checking out our detailed guide.

Get Google Sheets productivity and automation tips delivered straight to your inbox