How to Count If Cells Contain Text in Excel

To count cells that contain text in Excel, you can use the COUNTIF function. The COUNTIF function allows you to count cells based on specific criteria, such as containing text or certain characters.

Here are the steps to count cells containing text in Excel:

  1. Open your Excel workbook and select the range of cells where you want to apply the formula.
  2. In an empty cell, type the following formula:
=COUNTIF(range,"*")

Replace 'range' with the actual range of cells that you want to count. The asterisk (*) is a wildcard character that represents any sequence of characters.

For example, if you want to count cells containing text in the range A1:A10, you would use the following formula:

=COUNTIF(A1:A10,"*")
  1. Press Enter to apply the formula. Excel will display the total number of cells that contain text in the specified range.

Example

Let's say you have a list of values in cells A1:A5 as shown below:

A
1  Apples
2  25
3  Bananas
4  Oranges
5  45

To count the cells that contain text in the range A1:A5, follow these steps:

  1. In an empty cell, say B1, type the formula:
=COUNTIF(A1:A5,"*")
  1. Press Enter to apply the formula.

Excel will display the result (3) in cell B1, which indicates that three cells (A1, A3, and A4) contain text in the specified range.

Did you find this useful?