Check if a cell contains a substring

Case insensitive

In order to check whether a cell contains a substring in a text, use the following formula.

=ISNUMBER(SEARCH(substring,string))

The following formula will return TRUE if a substring is inside text. This formula is case insensitive.

Both of these examples will return TRUE.

=ISNUMBER(SEARCH("text", "Some text"))
=ISNUMBER(SEARCH("Text", "Some TEXT"))

Case sensitive

If you want to create a formula that is case sensitive, you have to use the FIND function, instead of SEARCH.

=ISNUMBER(FIND("text", "Some text"))
=ISNUMBER(FIND("Text", "Some TEXT"))

Now, the first example returns TRUE and the second one returns FALSE.

Get the file.