Skip to main content

Count the number of text cells in a range in Excel

To count the number of cells that contain text in a specified range, the COUNTIF function can help to easily get it done. Here this article will introduce the formula in details to help you solve the problem.


How to count the number of text cells in a range in Excel?

As the below screenshot shown, there is a data range in B5:B11, you can apply the below formula to count only the text cells.

Generic Formula

=COUNTIF(range,"*")

Arguments

Range (required): The range from which you want to count the text cells.

How to use this formula?

1. Select a blank cell to output the result.

2. Enter the below formula into it and press the Enter key to get the result.

=COUNTIF(B3:B9,"*")

How these formulas work?

=COUNTIF(B3:B9,"*")

  • The COUNTIF function is used to count the number of cells that meet a criterion. The wildcard character “*” is used here as a criterion to match any number of characters.

Notes:

1) Any of the below two SUMPRODUCT formulas can also be used to solve this problem.

=SUMPRODUCT(--ISTEXT(B3:B9))

=SUMPRODUCT(ISTEXT(B3:B9)*1)

2) By default, numbers, dates, errors, logical values of TRUE or False as well as blank cells are not counted with the above formulas;
3) If numbers are enter as text, the cell will be counted;
4) If a cell looks blank but contains non-printing character, it will be counted as well.
5) Normally, empty cells are not counted with the above formula. However, as the below screenshot shown, some cells look empty but in fact they contain apostrophe (‘), spaces or empty string (=””), in this situation, they will be counted as well.

To exclude the visually blank cells while counting, you can apply one of the below formulas.
1) Exclude blank cells (but with space characters, an apostrophe (‘) or an empty string (=””)):

=COUNTIFS(B3:B12,"*", B3:B12, "<> ")

2) Exclude blank cells (but with space characters existing):

=COUNTIFS(B3:B12,"*?*", B3:B12, "<> ")


Related functions

Excel COUNTIF function
The Excel COUNTIF function is a statistical function in Excel which is used to count the number of cells that meet a criterion.

Excel COUNTIFS function
The Excel COUNTIFS function returns the number of cells that meet one single criterion or multiple criteria.


Related formulas

Count cells that do not contain errors
This tutorial provides detailed steps to help you count the number of cells that do not contain errors in a specified range in Excel.

Count number of cells that do not contain many values
This post will step through how to count number of cells that do not contain many values in a specified range in Excel.

Count number of date cells in a range by day of week
Excel provides the combination of SUMPRODUCT and WEEKDAY functions to help us easily count the number of specified weekdays within a range. This tutorial provides a step by step guide to help you get through it.

Count cells that do not contain specific text
This tutorial provides detailed steps to help counting cells that do not contain specific text in Excel.


The Best Office Productivity Tools


Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations