How to Count Cells with Specific Text in Excel
Count Text Values in Excel is a Excel function that counts the number of cells in a specified range that contain a certain word or partial text.. Formula Genius generates and validates this formula automatically from a plain-English prompt.
Counting cells that contain specific words or partial text can be crucial for data analysis. This formula makes it easy!
The Formula
"Count cells in a range that contain a specific word or partial text"
=COUNTIF(range, "*text*")
This formula counts the number of cells in a specified range that contain a certain word or partial text.
Step-by-Step Breakdown
- Identify the range of cells you want to evaluate.
- Specify the text or partial text you want to count.
- Use wildcards (*) to match any characters before or after the text.
- Apply the COUNTIF function to get the total count.
Edge Cases & Warnings
- The text is case-sensitive, so 'Text' and 'text' are considered different.
- Cells with leading or trailing spaces may not match unless trimmed.
- Empty cells in the range will not be counted.
- If the specified text is not found, the result will be zero.
Examples
"Range: A1:A5 with values {"apple", "banana", "apple pie", "cherry", "grape"}; Count text 'apple'"
2
"Range: B1:B4 with values {"dog", "cat", "doghouse", "fish"}; Count text 'dog'"
2
Frequently Asked Questions
Can I count cells with multiple criteria?
Use the COUNTIFS function for multiple criteria.
What if my text contains special characters?
Enclose the text in double quotes and use wildcards as needed.
Does this formula work with numbers?
No, COUNTIF is specifically for text; use COUNT for numbers.
Can't find what you need?
Describe any formula in plain English and Formula Genius will generate, explain, and validate it — instantly.