Check if a text contains a word
PremiumIn B2, show TRUE if the product name in A2 contains "pro" in any case. Use SEARCH inside ISNUMBER.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Product | Is Pro? | ||||
| 2 | Laptop PRO 14 | |||||
| 3 | ||||||
| 4 | ||||||
| 5 | ||||||
| 6 | ||||||
| 7 | ||||||
| 8 |
Premium lesson
Unlock FIND and SEARCH and every other lesson
This is a premium lesson. Premium lets you solve it and every other lesson, take the timed mock tests, and earn certificates you can share on LinkedIn.
Next with premium:Joining text with & and TEXTJOINSUBSTITUTE, TEXTBEFORE and TEXTAFTER
Need help?
Why this works
SEARCH("pro",A2) returns 8, where "PRO" starts. If the word were missing it would return #VALUE!. ISNUMBER turns that into an answer: TRUE for a position, FALSE for the error. SEARCH works like FIND but ignores case and accepts the wildcards * and ?.
Common mistake: Using FIND for a "contains" check. FIND is case-sensitive, so "pro" misses "PRO" and the check says FALSE.
The answer
- B2
=ISNUMBER(SEARCH("pro",A2))
=ISNUMBER(SEARCH("word",A2)) returns TRUE when A2 contains the word in any case. Use FIND instead of SEARCH to match case.
FIND is case-sensitive and has no wildcards. SEARCH ignores case and accepts * and ?.