COUNT Count Cells Containing Text in … Counting how many cells in a column contain text… All versions Google Sheets Same syntax Microsoft Excel C2 =COUNTIF(range, "*") A B C Row Value Count Text 2 1 Approved 5 3 2 100 4 3 Pending 5
Learning Hub Formulas Count

Count Cells Containing Text in Excel and Google Sheets

Count 📊 All versions ✓ Google Sheets Same syntax in both apps
Purpose
Counting how many cells in a column contain text — as opposed to numbers, blanks, dates, or errors — comes…
Counting how many cells in a column contain text — as opposed to numbers, blanks, dates, or errors — comes up whenever you have mixed data and you need to know specifically how many entries are written labels. How many rows in this column have a status written out? How many product entries have a name rather than just a code? How many feedback rows have an actual comment in them? The answer in every case is the same short formula using the COUNTIF function with a single asterisk wildcard. The asterisk means "any text of any length", so the formula counts every text cell in the range while silently ignoring numbers and blank cells. This sits between the broader count non-blank cells formula (which counts everything except true blanks) and the more specific count cells containing specific text formula (which looks for a particular word). Understanding all three gives you a clean toolkit for any text-vs-number question.
Syntax
✓ All versions ✓ Google Sheets = Same syntax
=COUNTIF(range, "*")
Arguments
ArgumentRequiredDescription
range Required The cells to examine. A specific range like A2:A100 or a whole column reference like A:A both work. COUNTIF only counts text cells because the "*" wildcard matches only text.
criteria Required The literal string "*" wrapped in double quotes. The asterisk acts as a wildcard that matches any sequence of text characters, including an empty string, in a text cell.
How it works
The asterisk in COUNTIF criteria is a wildcard that matches any sequence of characters in a text value, including an empty string. Because the asterisk only ever matches against text, numeric cells are not considered — COUNTIF skips them silently. Blank cells are also skipped because there is nothing to match against. True/FALSE logical values are also skipped because they are not stored as text internally. This is the behaviour that makes "*" a reliable "count the text cells" pattern. Text matching is case-insensitive, but since the wildcard matches any text regardless of content, case does not affect this particular formula. One subtlety: if a cell contains the formula ="" or some other formula that returns an empty string, COUNTIF with "*" will not count it because the matched string is genuinely empty. This is different from the COUNTA function, which does count a cell containing ="" as non-blank. When that distinction matters, use the specific formula that fits your definition of blank. For counting cells that do contain text while also excluding a specific word, the COUNTIFS function lets you chain conditions cleanly.
Examples
1
Count how many cells in a mixed column of statuses (text) and amounts (numbers) contain actual text.
fx =COUNTIF(B2:B11,"*")
A B C
1 Row Value Count Text
2 1 Approved =COUNTIF(B2:B11,"*")
3 2 100
4 3 Pending 5
5 4
6 5 Complete
7 6 250
8 7 Open
9 8 75
10 9 Closed
11 10
Row 2: 5 — Five cells contain text: Approved, Pending, Complete, Open, and Closed. The three numbers (100, 250, 75) and two blank cells are all ignored.
The asterisk wildcard matches any text, so every text cell contributes one to the count regardless of what the text actually says. Numbers are never matched because "*" is a text pattern, and blank cells have nothing to match against.
2
Count how many entries in a mixed product list are product names (text) versus numeric SKU codes.
fx =COUNTIF(B2:B11,"*")
A B C
1 Row Entry Count Text
2 1 Laptop =COUNTIF(B2:B11,"*")
3 2 4421
4 3 Mouse 6
5 4 Keyboard
6 5 9823
7 6 Monitor
8 7 5521
9 8 Cable
10 9 Webcam
11 10 2290
Row 2: 6 — Six cells contain product names as text: Laptop, Mouse, Keyboard, Monitor, Cable, and Webcam. The four numeric SKU codes (4421, 9823, 5521, 2290) are skipped.
This is useful in data-quality audits where a column should ideally contain only text names but has numeric codes mixed in by mistake. The difference between this count and the total rows tells you how many entries need cleaning.
3
Count text cells while excluding a specific value. Here we count text entries that are not the word Approved.
fx =COUNTIFS(B2:B11,"*",B2:B11,"<>Approved")
A B C
1 Row Value Count Text Not Approved
2 1 Approved =COUNTIFS(B2:B11,"*",B2:B11,"<>Approved")
3 2 100
4 3 Pending 4
5 4
6 5 Complete
7 6 250
8 7 Open
9 8 75
10 9 Closed
11 10
Row 2: 4 — Of the 5 text cells (Approved, Pending, Complete, Open, Closed), only 4 are not Approved: Pending, Complete, Open, and Closed.
The same range B2:B11 is used twice — once to restrict the count to text cells, once to exclude a specific word. COUNTIFS applies AND logic so both conditions must be true. This is the cleanest way to answer "how many text entries other than X".
Common use cases
1. Count how many rows in a status column have a text status entered versus how many are blank or numeric
=COUNTIF(B2:B100,"*")
2. Count how many products in a list have a name (text) rather than only a numeric SKU
=COUNTIF(A2:A500,"*")
3. Count how many feedback entries actually contain a comment rather than a numeric rating
=COUNTIF(D2:D300,"*")
4. Count rows where the Description column has any text filled in for a data quality audit
=COUNTIF(E2:E1000,"*")
5. Count text entries only while excluding a specific word like Draft from the count
=COUNTIFS(A2:A100,"*",A2:A100,"<>Draft")
Common errors
Count is zero when the column clearly has text
The cells contain numbers displayed as text-like values but stored as numbers. COUNTIF with "*" only matches cells stored as text strings.
Fix: Check the cell format — if the data shows as a number in the formula bar without quotes, it is a number. Use COUNTA if you want to count both text and numbers.
Count is higher than expected
The range contains cells with the formula ="" or similar formulas that return empty strings. Some of those can still register as text.
Fix: Use COUNTA for a simpler non-blank count, or use COUNTIFS to combine "*" with a "<>" condition that excludes empty strings.
Logical values TRUE and FALSE are not counted
COUNTIF with "*" only matches text strings. TRUE and FALSE are logical values, not text.
Fix: If you want to include logical values in the count, use COUNTA instead — it counts everything that is not truly blank.
Tips and variations
Combine with "<>word" using COUNTIFS to exclude a specific text value
Chain two conditions with the COUNTIFS function — the first "*" limits the count to text, the second excludes a specific word. This is how I count "text cells that are not Draft" or "text cells that are not Cancelled" in editorial and operational dashboards.
=COUNTIFS(A2:A100,"*",A2:A100,"<>Draft")
Use COUNTA when you also want to count numbers
If your definition of "has an entry" includes numbers as well as text, switch to the count non-blank cells formula which uses COUNTA. COUNTA counts all non-blank cells regardless of data type.
=COUNTA(A2:A100)
Subtract from total rows to find the number of non-text cells
ROWS(range) gives you the total rows, and COUNTIF(range,"*") gives text cells, so ROWS(range) - COUNTIF(range,"*") returns the count of non-text entries (numbers + blanks + logical values). This is a quick data-quality check.
=ROWS(A2:A100)-COUNTIF(A2:A100,"*")
Excel vs Google Sheets
Excel vs Google Sheets
COUNTIF with the "*" wildcard works identically in Excel 2003 and newer, Excel 365, and every version of Google Sheets. The wildcard behaviour and text-only matching are consistent in both applications. Formulas copy between the two without changes.
Frequently asked questions
Use =COUNTIF(range, "*") where the asterisk is a wildcard matching any text of any length. This returns the count of cells that contain text of any kind — it will not count numbers, blank cells, errors, or dates. The same formula works in Google Sheets.
It counts text only. A cell containing 1000 as a number is not counted by COUNTIF(range,"*") because the wildcard "*" matches text strings, and a number is not text. If a cell contains "1000" as text (wrapped in quotes or entered after an apostrophe), it would be counted. To count both text and numbers together, use COUNTA.
COUNTA counts every non-blank cell — text, numbers, dates, errors, and logical values. COUNTIF(range,"*") counts only cells that contain text strings. If your data mixes numbers and text, COUNTA gives a higher number than COUNTIF(range,"*").
Use COUNTIFS with two conditions on the same range: =COUNTIFS(A2:A100,"*",A2:A100,"<>Approved"). The first condition limits the count to text cells, and the second excludes the specific word. Both conditions apply with AND logic.
No. Logical values (TRUE, FALSE) are not matched by the "*" wildcard, so they are not counted by COUNTIF(range,"*"). They are, however, counted by COUNTA. If your range includes logical values and you want only actual text strings, COUNTIF with "*" is the cleaner choice.