How to Check if a Cell Contains Specific Text in Google Sheets
Use =ISNUMBER(SEARCH("total",A2)) to return TRUE when the cell contains the word. SEARCH ignores case; FIND is case-sensitive.
=ISNUMBER(SEARCH("total",A2))
SEARCH returns the position if found; ISNUMBER turns that into TRUE, or FALSE when not found.
How it works
SEARCH looks for a substring and returns its position, or an error if it's absent. Wrapping it in ISNUMBER converts a found position into TRUE and the error into FALSE. SEARCH is case-insensitive; swap in FIND for a case-sensitive test. Combine with IF to output your own labels instead of TRUE/FALSE.
Variations
Return Yes or No
=IF(ISNUMBER(SEARCH("total",A2)),"Yes","No")
IF turns the TRUE/FALSE into readable text.
Case-sensitive match
=ISNUMBER(FIND("Total",A2))
FIND distinguishes Total from total.
Match the text in another cell
=ISNUMBER(SEARCH(B2,A2))
Looks for whatever word is typed in B2.
Examples
| Scenario | Formula |
|---|---|
| Flag rows mentioning refund | =IF(ISNUMBER(SEARCH("refund",A2)),"Yes","No") |
| Does the note contain a code word? | =ISNUMBER(SEARCH(B2,A2)) |
FAQ
What is the difference between SEARCH and FIND?
SEARCH ignores case and supports wildcards; FIND is case-sensitive and literal.
Why does my formula return an error instead of FALSE?
SEARCH alone errors when the text is missing. Wrap it in ISNUMBER so missing becomes FALSE.
How do I show Yes/No instead of TRUE/FALSE?
Wrap it in IF: =IF(ISNUMBER(SEARCH("total",A2)),"Yes","No").
Related formulas
- How to Find the Most Frequent Value in Google Sheets
- How to VLOOKUP with Multiple Criteria in Google Sheets
- Google Sheets Regex Tester — REGEXEXTRACT, REGEXMATCH & REGEXREPLACE (RE2)
- Google Sheets QUERY Builder — Generate the QUERY Formula & Copy
- Google Sheets IF Formula Builder — Nested IF & IFS Generator
- Google Sheets Percentage Calculator — % Change, % of Total, Increase/Decrease Formulas
- Google Sheets Date Difference Calculator — Days, Months, Years Between Dates
- Google Sheets XLOOKUP / VLOOKUP Builder — Generate the Lookup Formula & Copy