In this article:

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.

Using COUNTIF to count a specific value

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).

COUNTIF Formula in Google Sheets

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.

How to use COUNTIF in Google Sheets

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
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
We'll email you 1-3 times a week — and never share your information.
Get your copy of our free Google Sheets automation guide!
  • 27 pages of Google Sheets tips and tricks to save time
  • Covers pivot tables and other advanced topics
  • 100% free

Work less, automate more!

Use Lido to connect your spreadsheets to email, Slack, calendars, and more to automate data transfers and eliminate manual copying and pasting. View all use cases ->