Check if a cell contains a word
Return Yes or No depending on whether some text appears anywhere in a cell.
The formula
Excel and Google Sheets
=IF(ISNUMBER(SEARCH("refund", A2)), "Yes", "No")How it works
SEARCH("refund", A2)Returns the position of "refund" in A2, or an error if it is not there. Not case-sensitive (use FIND for case-sensitive).
ISNUMBER(…)True when a position was found.
Example
| A: Note | B: Result |
|---|---|
| Customer asked for a Refund | Yes |
| Order shipped | No |
Tips
- Check for several words with OR: =IF(OR(ISNUMBER(SEARCH({"refund","return"}, A2))), "Yes", "No").