To count cells containing text in Google Sheets, we will use 2 functions in Google Sheets : COUNTA and COUNTIF . With these 2 functions, users can count cells containing text in a certain data range, or more simply, in just 1 line. In particular, users can count non-blank cells with a special character they want to find. The following article will guide you to count non-blank cells in Google Sheets.
1. Count cells containing text in Google Sheets
If you are looking for the number of cells containing any text or numbers then use this method 1. This method will count the number of all non-blank cells in the specified data range.
Step 1:
Open the data table in Google Sheets, in the quantity result input box, we will use the COUNTA function and then select the data area to count the cells containing text.
We will enter the function formula =COUNTA(B21:B30) and press Enter to execute.

Step 2:
You will then see the number of cells containing text as shown below.

2. Count cells containing text in specific Google Docs
If you want to find the number of cells that contain a specific text string or number, you need to use the CountIf function. With this function, you can specify a text string and then the function counts only the cells that contain that text string.
We will enter the formula =COUNTIF(B21:B30;"Quoc Oai") and press Enter.

Immediately we will see the result is 1. There is only 1 cell in the data area containing 1 character Quoc Oai.

3. Count cells containing Google Sheets text with other characters
If you want to count cells that contain specific text with characters or other content, you can still use the Countif function, but the formula will be different. This method will count cells that contain the specified text, regardless of the content.
In the result box, we will enter the formula = COUNTIF (B21:B30;"*Quoc Oai*") and then press Enter.

Then we will see result 3, there are 3 cells containing the text Quoc Oai along with other content or characters.
