How to count Excel cells with text (with examples)

Microsoft is a great program that allows users to store and analyze large and even small amounts of data for interpretation. Apart from using only numerical values in Excel, you can also have cells that contain text within your data. To understand your data better, you need to differentiate cells that contain numbers and those with text. It is easy to do this as Excel provides you with all the features to use. Here we discuss the different ways you can count Excel cells that contain text.

Using the COUNTIF Function to count all cells with text

1. In an open Excel worksheet, click on a blank cell. Here is where you will insert your formula.

2. Type in your function =COUNTIF (range, criteria) in that cell.

COUNTIF function in Excel

3. For range, select the cell range you want to check whether there is text. In place of Criteria, type “*” with the quotes. The asterisks ensure we match all text values. For

4. Press the Enter key to apply your formula.

use asterisk to count text in Excel

How to count Excel cells that contain specific text

If you need to match any specific text value, instead of using the asterisk value, you can specify the criteria you want to use.  So, when counting specific text in cells in your Excel worksheet, your function will look like this

=COUNTIF (range, "text")

So, if you want to count the number of cells that contain the text green in cells B2 through B12, here is what your formula will look like:

 =COUNTIF (B2:B12, “*Green*”).

The asterisks symbol ensures that only the cells containing the text “green” with cells between B2 and B12 are returned.

How to count cells with specific text in Excel

How to count Excel cells that do not contain specific Text

For instance, you can use (<>) to count all cells that do not contain the text. So, when you use such a formula, here is what it will look like:

=COUNTIF (range, “<>*”)

How to count cells that do not contain specific text in Excel

The logical operator <> stands for not equal to as it counts non-text cells.

Using SUMPRODUCT Function to count cells with any text in Excel

You can use the SUMPRODUCT and ISTEXT functions to get the number of cells that contain text in your worksheet. The SUMPRODUCT function ensures a logical test is performed on a range, then counts the results. The ISTEXT function returns the TRUE value when given a text value. It checks if each cell in the specified range contains any text characters. Here is how your function will be:


You can also choose to use this formula:


You can also use the SUMPRODUCT, ISNUMBER, and FIND functions in case-sensitive cases to find specific text. The three formulas when applied in a formula will look like this:

=SUMPRODUCT (--(ISNUMBER (FIND (“text” range))))



How to count Specific Text in Excel

The function combinations are explained:

The FIND function will search the specific text in the defined cell. It will also return the number of the starting position of the text used as criteria.

The ISNUMBER function ensures that you do not get an error as an answer. It is used as it helps avoid getting errors! as an answer whenever the FIND function does not match the defined criteria.

Download the practice sheet

How to count cells with text practice workbook

Similar Reads

How to count in Excel after filter

How to count days since date in Excel

Leave a Reply

Discover more from Excel Wizard

Subscribe now to keep reading and get access to the full archive.

Continue reading