In this article:

COUNTIF Contains X in Google Sheets (Easiest Way in 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.

Use our software for invoice reminders to easily set up custom reminders from your spreadsheet in just a few clicks. 

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. 

Schedule a free automation consult
Learn more

Automate repetitive tasks with Lido

Save hours on repetitive and tedious work. Lido is a new spreadsheet that connects your spreadsheets, forms, PDFs, and email inbox.

Trigger
Action
Select trigger
When a cell value in Google Sheets changes
Check Google Sheets for today's date
When a new row is added to Google Sheets
On new Google Form submission
Send me a daily reminder
On new Typeform submission
When a cell value in database changes
Check database for today's date
When a new row is added in database
When a new HubSpot customer is created
Select action
ADDCALENDAREVENT
Creates a one- or multiple-day calendar event with optional attendees
ADDHUBSPOT
Adds an object to Hubspot
ADDSLACKCHANNEL
Create a Slack channel, and optionally add a topic or members
CALLURL
Makes any HTTP request
CREATEGOOGLEDOC
Replaces [@column_name] values in a Google Doc with the corresponding table row's values
CREATEPDF
Replaces [@column_name] values in a Google Doc with the corresponding table row's values, then export it as a PDF
FETCH
Makes any HTTP request and returns the response
INSERTROWS
Inserts given array below defined values in given worksheet
SENDGMAIL
Sends an email using your Google account
SENDOUTLOOK
Sends an email using your Microsoft Outlook account
SENDSLACK
Sends a Slack message
SENDSMS
Sends an SMS message using your Twilio account
UPDATECELL
Updates cells with given values
UPDATEHUBSPOT
Updates a property of a Hubspot object
Trigger is required
Action is required
Get started