Excel spreadsheets are a great way to store and analyze data, and generally contain cells with a combination of numbers and text. To further understand your data, you need to highlight cells with text. This process is much easier than it looks.

This article explains how to select a range of cells and then use the COUNTIF function to count the number of cells that contain text. Let’s get started!

## How to count cells containing text in Excel on Windows PC

To count the number of cells containing text within an Excel spreadsheet using a Windows computer, do the following:

- Click a blank cell in the spreadsheet to insert the formula.

- Type or paste the job
**“****=COUNTIF (range, criteria)****“**Without quotes, which counts the number of cells containing text within a given cell range.

- For Range, enter the range of cells you want to check. Write the first and last cells separated by a colon. For example, to count the number of cells from A2 to A9, you can enter the following text string: “

. ”**A2:A9**

- For Criteria, type

with quotes. This pane counts the number of cells that contain text within the specified range. The full formula should look like this:**"*"**

. ”**=COUNTIF (A2:A9, “*”)**

- Now press
to apply the formula. The result will be displayed in the formula cell.*“Enters”*

## How to count cells containing text in Excel on a Mac

The steps for counting cells containing text within a spreadsheet via macOS are the same as in Excel for Windows:

- release
Then open the spreadsheet you want to analyze. You can also just*“Excel”,*The file if it has Excel as the default program.*“double click”* - select file
into the spreadsheet to enter the formula.*“empty cell”* - In the empty cell, type the following:

. This formula counts the number of cells in the specified range with the text inside.*=COUNTIF (range, criteria)* - For Range, type the range of cells you want. Enter the first and last cells, divided by a colon. For example, to count the number of cells from B2 to B10, the following should be written: “

. “*B2:B10* - For the Criteria pane, type

with quotes. This pane counts the number of cells that contain text in the range you typed. For example, the completed formula should look similar to “*“*”*

. “*=COUNTIF (B2:B10, “*”)* - On the keyboard, press “
Apply the formula. The result appears in the selected cell.*Enters*

## How to count cells containing text in Excel 365

To count the number of cells containing text in a spreadsheet using Excel 365, you can apply the same “COUNTIF” function used in Excel for Windows and macOS. Here’s how:

- open the
You want to check.*Excel spreadsheets* - Click
to write the formula.*“empty cell”* - In the empty cell, write: “

. This formula counts the number of cells that contain text within the specified range of cells.*=COUNTIF (range, criteria)* - For the Range pane, type the range of cells you want. Enter the first and last cells separated by a colon. For example, to count the number of cells from C2 to C11, type the following text string: “

. “*C2:C1* - For Criteria, type or paste

with quotes. This pane counts the number of cells (in the specified range) that contain text. For example, the completed formula should look like this:*“*”*

. “*=COUNTIF (C2:C11, “*”)* - Now press
Apply the formula you just created. The result will be displayed in the formula cell.*Enters*

## How to count cells containing text in Excel on iPhone app

To count the number of cells containing text within a spreadsheet using the Excel app on your iPhone, do the following:

- Play file
*iPhone Excel app.* - tap on
To view your saved spreadsheets, then select File*“to open”*to open it.*“excel file”* on me*“double click”*In the spreadsheet to enter the formula “COUNTIF”, or you can*“empty cell”*a*“long press”*then press*“empty cell”*from the popup menu.*“release”*

- In the empty cell, type the following:

. This formula counts the number of cells that contain text within a cell range.*=COUNTIF (range, criteria)*

- For the “Scope” part, type File
want to count. Enter the first and last cells separated by a colon. To count the number of cells inside D2 through D12, type the following: “*“cell range”*

. ”*D2:D12*

- for the “criteria” type

with quotes. This pane counts the number of cells that contain text in the range. The full formula should look like this:*“*”*

. ”*=COUNTIF (D2:D12, “*”)*

- Now, tap on “
to apply the generated formula. The result appears in the formula cell.*Enters*

## How to count cells containing text in Excel on Android app

To count the number of cells containing text in a spreadsheet using the Android Excel app, do the following:

- Play file
*Android Excel Application.* - Open the spreadsheet you want to check by clicking
To see your saved spreadsheets, then click the desired file to open it automatically.*“to open”*

on me*“double click”*To enter the “COUNTIF” formula. Instead,*“empty cell”*Which*“long press”*then press*“empty cell”*from the popup menu.*“release”*

- Enter the range of cells you wish to calculate for the “Range” portion of the formula:

No quotes. This formula counts the number of cells that contain text within a cell range.*=COUNTIF (range, criteria)*

- Enter the range of cells you want to calculate for the “Range” portion of the formula. Include the first and last cells separated by a colon. To count cells E2 through E12 from a single column, enter the following text string: “

. ”*E2:E12*

- For the Criteria part of the formula, type

with quotes. This part of the text string counts the number of cells containing text in the specified range, including more than one row. Your full formula should look like this:*“*”*

. ”*=COUNTIF (A2:E12, “*”)*

- Now press
to apply the formula. The result appears in the formula cell.*“Enters”*

## How to count cells in Excel that contain specific text

With the “COUNTIF” function, you can count the number of cells containing certain text strings, such as “Excel”, “John” or “John Meyers”. The formula is similar to counting cells containing any text, but you change the “criteria” part of the formula to find specific text. In this example, you’ll see how often the word “Excel” appears in a specific cell range:

- release
on your device and open the custom file, or run a file*“Excel”**a file*Direct if set to open Excel by default. - Click
to write the formula.*“empty cell”* - In the empty cell, type the following string without the quotes: “

. ”*=COUNTIF (range, criteria)*

- Enter the range of cells you want to calculate for the “Range” portion of the formula. Enter the first and last cells separated by a colon. To count cells A2 through A20, type the following string without the quotes:

. ”*A2:A20*

- For the Criteria section of the formula, type
`"Excel"`

with quotes. This part of the text string counts the number of cells containing “Excel” in the specified range. The completed text string should look like “.`=COUNTIF (A2:A20, "Excel")`

## How to count cells with duplicate text in Excel

Besides counting cells with specific text and text, you can count cells with duplicate content.

In the following example, we are looking for duplicate student scores.

- Column A – Lists Our Students (A2: A10)
- Column B – Lists each student’s grades (A, B, or C)
- Column D – Lists all available scores, including D2 for “As”, D3 for “Bs” and D4 for “Cs”.
- Column E – Lists the number of each score.

### Count cells with repeating text including the first instance

To count the number of cells in the spreadsheet with instances of class A, B, or C, including the first example, enter the following formula:

- For grade A, click on cell E2 and type the following text string:
`=COUNTIF (B2 : B10, D2)`

“.

- For instances of degree ‘B’, click on cell E3 and type the following text string:
`=COUNTIF (B2 : B10, D3)`

“.

- For cases of degree ‘C’, click on cell E4 and type the following:
`=COUNTIF (B2:B10, D4)`

. ”

You now have the number of duplicate estimates, including the first instance listed in column “E.”

## How to count cells with colored text in Excel

Excel does not have a specific formula for counting the number of cells based on the color of their text. To get around this, filter the results and then count the cells.

- Open the spreadsheet you want to analyze.

- Right-click a cell with the text of the color you want to calculate.

- Choose “
,” and then “*purifier*Filters cells with the selected text color.*Filter by the color of the selected cell line*

- Next, tell Excel to calculate the range of your data. If the text fills cells B2 through B10, enter the following formula: “
`=SUBTOTAL (B2:B10)`

“.

Once you press “** Enters**To apply the filter, Excel will only display cells containing that color and hide the remaining values.

The ‘SUBTOTAL’ function will exclude values in hidden rows and, therefore, return only the number of the specified text color.

In conclusion, Excel does a great job of storing your data and making analysis easier. It deals with text as well as numbers. It has more than four hundred jobs, including “COUNTIF”. This function helps to find the total cells containing specific information such as cells containing text and the number of repetitions of a specific text.