In Excel: use =ISNUMBER(SEARCH("text",A2)) for a case-insensitive contains test, or wrap it in IF to return labels such as Yes and No.
On this page7
Put the text to find in quotes or in a separate cell.
Use SEARCH for case-insensitive matching or FIND for case-sensitive matching.
Wrap with ISNUMBER to get TRUE/FALSE.
Wrap with IF when the sheet needs labels or categories.
What this does
Excel has no single CONTAINS function, so the common pattern is SEARCH inside ISNUMBER. SEARCH returns a position when the text is found and an error when it is not; ISNUMBER converts that into TRUE or FALSE. FIND is the case-sensitive alternative. The same idea underpins a lot of everyday Excel work, so the few minutes spent getting it right here pay back across every sheet you build afterwards. Treat it as a pattern, not a one-off, and it stops being something you look up and starts being something you reach for. The difference between a quick fix and a sheet you can trust is the extra minute you spend validating “excel count if contains text”. Start on a copy or a tiny sample, keep the affected cells visible, and compare the result with the outcome you expected before you touch the real workbook. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. The point is a workflow that saves repeating the same clicks every week, but the practical win is that someone else can open the file and understand what happened without asking you.
A worked example
A2 contains North-West Region. =ISNUMBER(SEARCH("west",A2)) returns TRUE because SEARCH ignores case. =IF(ISNUMBER(SEARCH("west",A2)),"West","Other") returns West for matching rows and Other for the rest. Contains formulas power tagging, routing, cleanup and exception reports where exact equality is too strict. Check the referenced cells, argument order and result type in your workbook. Start with the worked example before changing an input, then compare the changed result with the calculation you expected. An error value or a result of a different type is a reason to inspect the inputs and arguments.
In Google Sheets
Google Sheets support for this task has not been verified. Check the function, arguments and workflow in the target product before transferring the example. Matching formula notation does not establish identical behaviour. Keep this page bookmarked for the next time the same question comes up. Better still, repeat the steps once in your own workbook — doing it yourself is what turns a copied answer into something you remember. For “excel count if contains text”, keep the input cells and the result visible while you check the formula in Excel. Follow the worked example and change one input at a time. The steps explain the workbook calculation; this page does not run a live calculator for that task.
Common mistakes
- Using equals when the cell contains more than just the target word.
- Forgetting that SEARCH is not case-sensitive.
- Letting
#VALUE!show instead of wrapping SEARCH inISNUMBER. - Hard-coding text in many formulas instead of referencing one criteria cell.
Frequently asked questions
Is there a CONTAINS function in Excel?
No. Use ISNUMBER with SEARCH or FIND.
How do I make the test case-sensitive?
Use FIND instead of SEARCH.
Can I return custom text?
Yes. Wrap the test in IF.