Contains Text in Excel

“contains text in excel” comes up constantly, so this page leads with the exact answer, and only then explains the detail. Everything works in Excel on Windows and Mac and maps almost one-to-one to Google Sheets. Copy the answer above and get back to work, or read on to turn a one-off fix into something you never have to look up again.

Exact answer

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
Annotated stepsExcel
1

Put the text to find in quotes or in a separate cell.

2

Use SEARCH for case-insensitive matching or FIND for case-sensitive matching.

3

Wrap with ISNUMBER to get TRUE/FALSE.

4

Wrap with IF when the sheet needs labels or categories.

=ISNUMBER(SEARCH("text",A2))
Ctrl+CthenCtrl+Shift+V+Cthen+Ctrl+VPaste values · WindowsMac

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 “contains text in excel”. Start on a copy or a tiny sample, keep the affected cells visible, and compare the result with the tool above 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 text operation that turns messy entries into clean, usable data, 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. If there is any chance you will reuse this, drop it into a small template tab right now: a labelled input area on the left and the formula beside it, checked once against the tool above. Next time the same question comes up, the answer is a single paste away instead of a rebuild from memory.

In Google Sheets

Google Sheets handles this almost identically to Excel. The formula syntax above is the same, and the menu lives under a slightly different label rather than a ribbon tab. Use the platform toggle at the top of the page to switch every keyboard shortcut between Windows and Mac, and expect at most cosmetic differences in naming. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. If you take one thing from this page on “contains text in excel”, make it the habit rather than the keystrokes: set the problem up with labelled inputs, reference those cells, and let Excel do the recomputing. Bookmark the page for the syntax, but do the example once in a blank sheet and check it against the tool above — five minutes of hands-on practice fixes the method in memory far better than re-reading, and it surfaces the small snags while they are still harmless. After that the technique is genuinely yours: faster than searching for it again, and reliable enough to drop into work that other people depend on.

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 in ISNUMBER.
  • 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.

Other ways people ask this

This is also commonly searched as “excel formula contains text”, “excel formula text contains”, “text contains excel” and “excel contains text formula”. They describe the identical operation, so you are in the right place no matter how you phrased it.

Why do people search for this in so many different ways?

Because the same task has many names. “excel formula contains text”, “excel formula text contains”, “text contains excel” all point at the one operation explained on this page, which is why they all lead here.