Skip to content

Check if a cell contains a word

Return Yes or No depending on whether some text appears anywhere in a cell.

The formula

Argument separator
Excel and Google Sheets
=IF(ISNUMBER(SEARCH("refund", A2)), "Yes", "No")

How it works

  1. 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).

  2. ISNUMBER(…)

    True when a position was found.

Example

A: NoteB: Result
Customer asked for a RefundYes
Order shippedNo

Tips

  • Check for several words with OR: =IF(OR(ISNUMBER(SEARCH({"refund","return"}, A2))), "Yes", "No").