Sunday, November 27, 2022
HomeGoogleHow to count cells containing text in Google Sheets?

How to count cells containing text in Google Sheets?

Using the Google Sheets COUNTA and COUNTIF functions, you can count cells that contain any text, specific text, or partially matching text. This is a great way to find nonblank cells in your spreadsheets. We will show you how to use these functions.

HOW TO CREATE A CALENDAR IN GOOGLE SHEETS

Which cell counting method to use?

If you are looking to know the number of cells which contain text or numbers, please use the first method below. It counts the number of all nonblank cells in the specified data range.

If you want to know the number of cells containing a specific text or number string, please use the second method below. It allows you to specify your text string and then count only the cells that contain that string.

Finally, if you want to count the cells which contain the specified text and other content, please use the third method below. This method will count your cells as long as they contain your text.

Count cells that contain any text

To get the number of cells containing text or numbers, use the COUNTA function in your worksheet as follows.

First, open your spreadsheet and click on the cell where you want to see the result.

Select a cell.

In the selected cell, type the following function. In the function, replace C2:C11 with your data range. Then press Enter.

=COUNTA(C2:C11)

Enter the COUNTA function.

In the selected cell, you will see the number of cells that contain text or numbers.

The result of the COUNTA function.

And you are done.

Count cells that match specific text

To display the number of cells that contain only the specified text, use the COUNTIF function of Sheets as follows.

First, in your spreadsheet, click on the cell where you want to see the result.

Select a cell.

In the selected cell, enter the following function. Replace C2:C11 with your data range and Mahesh with the text you want to appear in a cell for it to be counted.

=COUNTIF(C2:C11, “Mahesh”)

Type the COUNTIF function.

Then press the Enter key.

In the selected cell, you will see the number of cells which contain your specified text.

The result of the COUNTIF function.

Enjoy!

Count cells that contain specific text anywhere

To count the cells that contain the text or numbers you specified, use the COUNTIF function with a wildcard character as follows.

In your spreadsheet, click on the cell where you want to get the result.

Select a cell.

In the selected cell, type the following function. In this function, replace C2:C11 with your data range and Mahesh with the text you want to appear in a cell for it to be counted. Then press the Enter key.

We have added an asterisk

before and after the text string so that the function counts your cells regardless of where your string is in the cell.=COUNTIF(C2:C11, »Mahesh

“)

Use the COUNTIF function with a wildcard.

In the resulting cell, you will find that the function has counted all the cells that contain the specified text.

The result of the COUNTIF function with a wildcard.

There you go, you’re ready.

If you want to do the reverse of the above, i.e. count all blank cells, there is an easy way to do it in Google Sheets.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Tags