There are many ways to integrate data in Google Sheets or to obtain data from different sources. One way is to use the COUNTIF function and the Google Sheets feature in the Data tab. The COUNTIF function is one of the most powerful functions in Google Sheets, but many users are unaware of its uses. The important thing to remember about COUNTIF is that it is not a filter. However, it does perform a calculation that can be used in filters.

The COUNTIF command, which stands for Counts IF, is an Excel command that helps you count cells based on a condition. It is explained in a video guide on YouTube. In this guide, an Excel expert shows you how to use the COUNTIF command to count cells based on a formula.

When working with complex data tables in Microsoft Excel or Google Sheets, we often encounter situations where we need to calculate the number of occurrences of a particular text or numeric term based on some condition, also known as a criterion. Counting these terms manually is almost impossible when working with a large number of rows in a spreadsheet. That’s where the COUNTIF feature in Google Sheets comes in handy. This feature allows users to analyze data in a Google spreadsheet by counting terms in specific ranges. The basic syntax of the COUNTIF function is given below. =COUNTIF(range, criteria) The argument range is the specific number of cells that will be included in the calculation. A criterion is a specific condition applied to cells. The criterion is always indicated between quotation marks. You can also hide columns in Google Sheets that contain feature results if you don’t want other users to see the results.

**COUNTIF Google Sheets feature: Counting cells in no time!**

Before you use the function in a spreadsheet, you should know that the COUNTIF function only supports one criterion; if you want to apply multiple conditions, you must use other functions to do so. So let’s see how you can use this feature.

**3 steps to use the COUNTIF function in Google Sheets**

1. Open Google Sheets and select a column. 2. Define and enter the Google Sheets COUNTIF formula. 3. Press the Enter key to get the result. When working with numerical data in Google Sheets, you can use the COUNTIF feature in eight different ways.

**8 ways to use the COUNTIF function**

You can choose one of these methods depending on the data you have. Let’s look at the detailed steps and methods with pictures.

**1. how to use the basic function of Google Sheets COUNTIF**

Let’s look at the basic way to use the COUNTIF feature in Google Sheets.

**1. select columns**

First, select the range argument to which you want to apply the COUNTIF function. Here we select the reference to cell A1:B17. alt=Table for function COUNTIF data-ezsrc=http://server.digimetriq.com/wp-content/uploads/2021/06/8-Ways-To-Use-COUNTIF-Google-Sheets-Command-For-Data.png />Table for function COUNTIF

**2. Determine condition**

In the sales table below, we need to find out how many states have 86 sales. So the formula for the COUNTIF function in Google Sheets looks like this. =COUNTIF(A1:B17,86) alt=Enter the formula in this sales table data-ezsrc=http://server.digimetriq.com/wp-content/uploads/2021/06/1623630559_769_8-Ways-To-Use-COUNTIF-Google-Sheets-Command-For-Data.png />Enter the formula in this sales table

**3. Search results**

Press the Enter key to display the results. You can see how the number of cells that meet the criteria appears in the selected active cell. alt=Show Results data-ezsrc=http://server.digimetriq.com/wp-content/uploads/2021/06/1623630560_115_8-Ways-To-Use-COUNTIF-Google-Sheets-Command-For-Data.png />Show Results

**2. to use the reverse COUNTIF function**

Now you can also calculate the results for a condition that is the exact opposite of the fixed condition. To calculate the number of all states with notch sales other than 86, follow this basic formula. =COUNTIF(A1:B17,<>86) alt=Use reverse function data-ezsrc=http://server.digimetriq.com/wp-content/uploads/2021/06/1623630561_119_8-Ways-To-Use-COUNTIF-Google-Sheets-Command-For-Data.png />Use reverse function

**3. Use of COUNTIF with operators**

Now that we know the basics, let’s see how we can use the COUNTIF function in Google Sheets with the comparison operator. These are the five basic types of operators that can be used in the COUNTIF function. 1. More than that: >2. More or less the same: >=3. Less than: <4. Less than or equal to : =<5. Not equal : <>

**1. Entering formula**

Consider the table in the previous example. We need to extract the number of states with more than 100 sales. The COUNTIF formula for this condition would be as follows. =COUNTIF(A1:B17,>100) alt=Feed formula data-ezsrc=http://server.digimetriq.com/wp-content/uploads/2021/06/1623630562_199_8-Ways-To-Use-COUNTIF-Google-Sheets-Command-For-Data.png />Feed formula

**2. Show result**

Press the Enter key to get the result. alt=Display result data-ezsrc=http://server.digimetriq.com/wp-content/uploads/2021/06/1623630563_661_8-Ways-To-Use-COUNTIF-Google-Sheets-Command-For-Data.png />Display result

**4. use the COUNTIF function with text**

Using the COUNTIF function in Google Sheets for text terms is similar to what we saw for numeric values.

**1. Select cells**

Let’s look at this table to learn how to use the COUNTIF function. The objective is to determine how many times the word Virginia appears in the list. First, select the range argument to which you want to apply the function. This will be the range A1:B20. alt=Scoreboard data-ezsrc=http://server.digimetriq.com/wp-content/uploads/2021/06/1623630564_478_8-Ways-To-Use-COUNTIF-Google-Sheets-Command-For-Data.png />Scoreboard

**2. Entering formula**

The COUNTIF formula for obtaining the number of digits in this case is given below. =COUNTIF(A1:A20, Virginia) Enter the formula in the cell where you want to calculate the result. alt=Feed formula data-ezsrc=http://server.digimetriq.com/wp-content/uploads/2021/06/1623630565_204_8-Ways-To-Use-COUNTIF-Google-Sheets-Command-For-Data.png />Feed formula

**3. Refers to the value of the selected empty cell**

After entering the formula, press Enter to see the result. alt=Show result data-ezsrc=http://server.digimetriq.com/wp-content/uploads/2021/06/1623630567_834_8-Ways-To-Use-COUNTIF-Google-Sheets-Command-For-Data.png />Show result

**5. to use the COUNTIF function with wildcard characters**

Wildcards count every instance of the text; since they are not case sensitive, they count every unique value. In the following table, we need to choose the word lives and find the number of times it occurs.

**1. Select cell range**

Select the range of cells you want to edit. Here we have selected the range A1:A5. alt=Select field data-ezsrc=http://server.digimetriq.com/wp-content/uploads/2021/06/1623630567_976_8-Ways-To-Use-COUNTIF-Google-Sheets-Command-For-Data.png />Select field

**2. Entering formula**

Now enter the formula COUNTIF into the cell. The function of this method is given below. =COUNTIF(A1:A5, *resides*) alt=Add alternate formula data-ezsrc=http://server.digimetriq.com/wp-content/uploads/2021/06/1623630569_669_8-Ways-To-Use-COUNTIF-Google-Sheets-Command-For-Data.png />Add alternate formula

**3. Search results**

Press the Enter key to display the results. You will see the number of hits that occur in the selected cell. alt=Show results for COUNTIF Google Sheets data-ezsrc=http://server.digimetriq.com/wp-content/uploads/2021/06/1623630570_142_8-Ways-To-Use-COUNTIF-Google-Sheets-Command-For-Data.png />Show results

**6. Calculate the occurrence at the beginning or end of a text string**

The two asterisks in the formula ensure that Google Sheets can read the selected term, regardless of its location in the selected range. For example, in the previous method we saw that the word is in the middle of the text string, not at the beginning or end. Therefore, we needed two placeholders for Google Sheets to count the term. Now let’s see how to calculate the occurrence of a term at the beginning and end of a text string.

**1. Calculating occurrences at the beginning of a line**

First, create a Google Sheets COUNTIF function for the table below. This function counts the number of times the word California appears at the beginning of a text string. alt=Wildcard method table data-ezsrc=http://server.digimetriq.com/wp-content/uploads/2021/06/1623630571_754_8-Ways-To-Use-COUNTIF-Google-Sheets-Command-For-Data.png />Wildcard method table The formula for this function is given below. =COUNTIF(A1:A5, California*) alt=COUNTIF Google Sheets data entry-ezsrc=http://server.digimetriq.com/wp-content/uploads/2021/06/1623630572_997_8-Ways-To-Use-COUNTIF-Google-Sheets-Command-For-Data.png />function Press the Enter key to see the result. Ideally, Google Sheets would only count the term twice, since it appears twice at the beginning of the text string. alt=Show result for COUNTIF Google Sheets data-ezsrc=http://server.digimetriq.com/wp-content/uploads/2021/06/1623630572_886_8-Ways-To-Use-COUNTIF-Google-Sheets-Command-For-Data.png />Show result

**2. Calculate the occurrence of the term at the end of line**

To calculate the occurrence of a term at the end of a string, we need to place a placeholder at the beginning of the term in the function. This is what the formula would look like: =COUNTIF(A1:A5, *California) After pressing Enter, the result is displayed in the selected cell. alt=Result for COUNTIF Google Sheets data-ezsrc=http://server.digimetriq.com/wp-content/uploads/2021/06/1623630574_170_8-Ways-To-Use-COUNTIF-Google-Sheets-Command-For-Data.png />View the result Ideally, the answer should be one, since California appears only once at the end of the text string.

**7. how to calculate empty cells**

If you want to know the number of empty rows in the dataset, you can use the COUNTIF function in Google Sheets. In fact, this feature can also help you determine the number of unfilled cells in your Google Sheet.

**1. Select the cells in the range**

Start by selecting a range of cells. The following table shows the selected range of cells A1:B7. alt=Select range for COUNTIF Google Sheets data-ezsrc=http://server.digimetriq.com/wp-content/uploads/2021/06/1623630574_910_8-Ways-To-Use-COUNTIF-Google-Sheets-Command-For-Data.png />Select range

**2. Enter a function**

Now enter the formula to calculate the empty rows in the worksheet. The formula would be as follows: =COUNTIF(A1:B7, ) alt=Enter formula for COUNTIF Google Sheets data-ezsrc=http://server.digimetriq.com/wp-content/uploads/2021/06/1623630576_386_8-Ways-To-Use-COUNTIF-Google-Sheets-Command-For-Data.png />Enter formula The lack of a single character in the second line indicates that we are looking for empty lines.

**3. Show result**

Press the Enter key to display the result. You can see that the number of empty rows appears in the highlighted rows. alt=Show result with COUNTIF Google Sheets data-ezsrc=http://server.digimetriq.com/wp-content/uploads/2021/06/1623630576_993_8-Ways-To-Use-COUNTIF-Google-Sheets-Command-For-Data.png />Show result

**4. Calculation of empty lines**

Counting the number of empty rows is a simple task; just set up the COUNTIF function in Google Sheets as shown below. =COUNTIF(A1:A7,<>) The <> symbol tells Google to read the opposite of what is requested. alt=Calculate unfilled cells with COUNTIF Google Sheets data-ezsrc=http://server.digimetriq.com/wp-content/uploads/2021/06/1623630577_534_8-Ways-To-Use-COUNTIF-Google-Sheets-Command-For-Data.png />Calculate unfilled cells. You can see that the corresponding graph has appeared in the adjacent column C.

**8. how to use the COUNTIFS function**

If you want to get a count for multiple criteria in the same row or column, you can use the COUNTIF formula. The syntax of the COUNTIFS formula is shown below. =COUNTIFS(range1, criterion1, range2, criterion2,…)

**1. Data range selection**

For this particular example, let’s look at the same table we used for the COUNTIF function. The main objective is to count the number of states with sales per notch between 100 and 170. alt=table for COUNTIFS function data-ezsrc=http://server.digimetriq.com/wp-content/uploads/2021/06/1623630579_160_8-Ways-To-Use-COUNTIF-Google-Sheets-Command-For-Data.png />table for COUNTIFS function

**2. Enter a function**

Now enter the function in the cell of the adjacent column B. =COUNTIFS(A1:B17,>=100,A1:B17,<=170) alt=Enter COUNTIF Google Sheet data-ezsrc=http://server.digimetriq.com/wp-content/uploads/2021/06/1623630580_410_8-Ways-To-Use-COUNTIF-Google-Sheets-Command-For-Data.png />Enter COUNTIF Function

**3. Search results**

Press the Enter key and see the results. alt=ShowCOUNTIFS result data-ezsrc=http://server.digimetriq.com/wp-content/uploads/2021/06/1623630581_187_8-Ways-To-Use-COUNTIF-Google-Sheets-Command-For-Data.png />ShowCOUNTIFS result The COUNTIFS function is the best choice when you want to get results by comparing two or more cell ranges in a Google Sheets worksheet. To make your spreadsheet even better and clearer, Google Sheets lets you use data validation and conditional formatting to quickly define data.

**Supplement**

Google Sheets offers several features that make users’ lives easier when working with large, complex data tables. The COUNTIF function helps the user to count cells with specific values based on exact match and reduces the burden of performing this operation manually. The COUNTIF function in Google Sheets supports comparison operators and wildcards when a specific condition is run on a range of data. If you also want to match and apply multiple conditions, you must use the COUNTIFS function.

### Frequently Asked Questions

#### How do you do a Countif formula in Google Sheets?

Countif formula: We can count how many of an item we have in a list if we can use a COUNTIF formula in Google Sheets. A COUNTIF formula is a formula that determines if a specified condition is true or false. A countif formula is written using the COUNTIF() function. Countif is a powerful tool in Google Sheets that helps you count values in cells. It has tons of powerful functions you can use to calculate things based on ranges of values.

#### How do I count cells with data in Google Sheets?

Counting cells in Google Sheets is very useful for showing data out in a table in real time. It’s not as good as using a bar chart since you can’t always see the size of the bars but it’s still easy to use. Counting cells in Google Sheets can be a little tricky. In this post, we will describe the most common use cases. We will explain how to count cells by its name, by a formula in a range, by the number of times a function has been applied, by the number of set differences, by the number of values greater than a certain value, by the number of cells with certain values, and by other methods.

#### Does Google sheets have a count function?

Countif is a very useful Google Sheets command that can be used to count the number of instances of a particular cell value in a spreadsheet. But sometimes, you might need a countif that is not quite as restrictive as the built-in one, such as counting the number of times each cell value appears in a particular column, or the number of instances of a particular cell value among a particular range of rows. If you’re looking for a quick and easy way to perform data calculations in Google Sheets, then you’ve come to the right place! We’ve rounded up 8 awesome ways that you can use COUNTIF, a built-in function in Google Sheets that can count numbers, and find the count of a subset of cells.

#### Related Tags:

**google sheets countif multiple rangescountif from another sheet google sheetsgoogle sheets countif contains textcount google sheetscountifsgoogle sheets countif multiple conditions**,**People also search for**,**Feedback**,**Privacy settings**,**How Search works**,**google sheets countif multiple conditions**,**google sheets countif multiple ranges**,**google sheets count if cell contains text**,**countif from another sheet google sheets**,**google sheets countif between two numbers**,**google sheets countif contains text**,**count google sheets**,**countifs**