Data Science

What is the best formula to count cells containing specific partial text strings in Excel?

KI Asked by Kimberly Evans · 11-11-2025
0 upvotes 14,382 views 0 comments
The question

I am working with a large dataset in Excel and need to find a way to count how many cells in a column contain a specific partial string rather than an exact match. For example, if I'm looking for the word "Sprint," I want to include cells that say "Sprint 1," "End of Sprint," or "Sprint Planning." I’ve tried standard count functions but they seem to only look for total matches. Is there a specific syntax or wildcard character I should be using within my formulas to capture these variations?

3 answers

0
BA
Answered on 13-11-2025

The most efficient way to handle partial matches in Excel is by using the COUNTIF or COUNTIFS function combined with the asterisk (*) wildcard. The asterisk represents any number of characters. If you want to count any cell containing "Sprint," your formula would look like =COUNTIF(A1:A100, "*Sprint*"). Placing the asterisk before and after the text ensures it finds the string regardless of where it sits in the cell. This is a standard practice in data auditing and quality management reporting when you need to categorize unstructured text entries without manually filtering every single row in your spreadsheet.

0
TH
Answered on 15-11-2025

That wildcard trick works great for static text, but is there a way to reference a specific cell containing the search term instead of typing the word directly into the formula? I often have a list of keywords in a separate table that I need to check against my main data range for reporting purposes.

RI 17-11-2025

Thomas, you can definitely do that by using the ampersand operator to join the wildcards with your cell reference. The syntax would be =COUNTIF(A:A, "*" & B1 & "*"), assuming B1 holds your keyword. This makes your summary tables dynamic, so if you change the keyword in B1, the count updates automatically. It is a lifesaver for building automated dashboards where the search criteria might change frequently based on the project phase or the specific quality metrics you are tracking that week.

0
PA
Answered on 19-11-2025

If you need to be case-sensitive, COUNTIF won't work as it ignores casing. In that case, you should use a combination of SUMPRODUCT and ISNUMBER(SEARCH()) for your partial match logic.

KI 20-11-2025

I agree with Patricia; the SUMPRODUCT method is much more robust. While COUNTIF is faster for simple tasks, SEARCH allows for advanced logic that is crucial when performing deep data science cleaning tasks on messy, user-generated text fields.

Share your thoughts

Your email address will not be published. Required fields are marked (*)

Professional Counselling Session

Still have questions?
Schedule a free counselling session

Our experts are ready to help you with any questions about courses, admissions, or career paths. Get personalized guidance from industry professionals.

Request a Call Back

Search Online

We Accept

We Accept

Follow Us

"PMI®", "PMBOK®", "PMP®", "CAPM®" and "PMI-ACP®" are registered marks of the Project Management Institute, Inc. | "CSM", "CST" are Registered Trade Marks of The Scrum Alliance, USA. | COBIT® is a trademark of ISACA® registered in the United States and other countries.

Book Free Session