# How to Count Cells with Text in Excel

August 1, 2022
1.0K Views
0

A free Office suite fully compatible with Microsoft Office

A free Office suite fully compatible with Microsoft Office

This article basically illustrates about the use of COUNTIF function in order to count the number of cells that contain specific text using COUNTIF function. Excel's COUNTIF function may count the number of cells in a range that satisfy a single condition. Dates, numbers, and text may all be counted in cells with COUNTIF.

Count the Number of Cells a String Exactly Matches:

This enables you to count every cell that contains a certain piece of text.

You can count any cells you choose, whether they say cake, pizza, five burgers, or anything else.

We employ the COUNTIF function to do this.

How to Count the Cells in a Table that Match a String:

1.In the cell where you wish to view the count, type =COUNTIF(

2.Choose the range in which you wish to look for text.

The text that should be in the cells you wish to count should be typed first, followed by a comma to move to the next parameter.4.Take note of the multiple quote marks that surround the red text in this instance. For it to function, the text has to be enclosed in quote marks.If you just press Enter without finishing the function with a closing parenthesis, the following result will appear:5.The number of cells in this case that had the word cake was tallied, and the result was 2.The formula that was employed is as follows:=COUNTIF(A1:A10,cake)

Several Words:Just adjust what is included in the quote marks, and you may search for numerous terms in the same way you would for a single word.We utilise the following while looking for five burgers this time:=COUNTIF (A1:A10,five burgers)

Count the Number of Cells That Contain a Specific String Anywhere in the Cell

Additionally, you may count cells that have a word fragment, a single letter, or any other particular character. This means that counting a cell does not require that its complete contents match.Like before, we continue to utilise the COUNTIF function, but this time, we alter how we enter the text to be searched.

How to Count Cells that Match a Section of a String

1.Enter =COUNTIF(in the cell where you want the count to appear.2.Choose the cell range to count.3.To move to the next parameter, type a comma, then type the text you wish to search for.This time, take note of the asterisk * that appears prior to and following the text string but between double quotation marks.According to this, the text may be located anywhere in the cell and need not be an exact match; it only has to contain pdf—or whatever you enter—somewhere in the cell.Hit enter to get the outcome:The equation we employed in this case is as follows:=COUNTIF(A1:A10,*pdf*)

The same method may be used to search for a number.