We can check IF A CELL CONTAINS a specific term in a set of data with a combination of the IF, SEARCH and ISNUMBER functions. We can apply this to copy specific text in another location. The steps below will walk through the process.

Figure 1 – Result of using the “if a cell contains” formula

General Formula




Setting up the Data

  • We will place the list of words in Cell B5 to Cell B8.
  • We will name Cell C3 as “Does this word contain “re”. This is what we wish to find from every cell

Figure 2- Setting up the Data

If a cell contains “re” display “Yes” or “No”

  • We will click on Cell C4 where we want the search result to be shown.
  • We will insert the formula: =IF(ISNUMBER(SEARCH("re",B5)),"Yes","No")
  • Now, we will press the Enter key.

Figure 3 – Cells containing “re” displays Yes or No

  • We will use the fill handle to copy the formula to the other cells to get the result

Figure 4 – Final result after using the fill handle tool

How to display text containing “re”

With the same data, if we want to display the cell text rather than “Yes” or “No”, then we will follow the process below:

  • We will click on Cell C5
  • We will insert the formula: =IF(ISNUMBER(SEARCH("re",B5)),B5,"")
  • If the cell contains “re”, then “Great” will be displayed. If it doesn’t contain “re”, then the output cell will remain empty

Figure 5 – Cells containing “re” displays the full term



  • SEARCH Function

The SEARCH function checks Cell B5 if it contains “re.”

  • ISNUMBER function

The ISNUMBER function returns as Yes if the text is found and No if the text is not found.

  • IF function
    =IF(B5="re", "Yes", "No")

The IF function returns the result into the output cell based on the returned result of the ISNUMBER function.