
=ISNUMBER(SEARCH(substring,text))
Related formulas
If cell contains
Cell contains one of many things
Categorize text with keywords
Count cells that contain specific text
Highlight cells that contain
Value exists in a range
Count cells that contain either x or y
To check if a cell contains specific text, you can use the SEARCH function together with the ISNUMBER function. In the generic version, substring is the specific text you are looking for, and text represents text in the cell you are checking.
In the example shown, the formula in D4 is:
=ISNUMBER(SEARCH(C4,B4))
This formula returns TRUE if the substring is found, and FALSE if not.
Note: the SEARCH function will automatically find partial matches.
The SEARCH function returns the position of the search string when found, and the #VALUE! error if not. We use this fact to test when the search string is found by using the ISNUMBER function to "catch" valid numeric positions.
ISNUMBER returns TRUE for numbers and FALSE for anything else. So, if SEARCH finds the substring, it returns the position as a number, and ISNUMBER returns TRUE. If SEARCH doesn't find the substring, it returns a #VALUE! error, which causes the ISNUMBER to return FALSE.
If you want this formula to be case-sensitive, you can replace the SEARCH function with the FIND function like so:
=ISNUMBER(FIND(substring,text))
If you want to do something when a cell contains specific text, you can wrap the formula in an IF statement like this:
=IF(ISNUMBER(SEARCH(substring,text)), "Yes", "No")
Instead of returning TRUE or FALSE, the formula above, will return "Yes" if substring is found and "No" if not.
To test a cell for a single hardcoded substring, just enclose the text in double quotes. For example, to check A1 for the text "apple" use:
=ISNUMBER(SEARCH("apple",A1))
If you need to test a cell for more than one thing (i.e. for one of many substrings), see this example formula.
See more related formulas below.

=ISNUMBER(SEARCH(substring,text))
Related formulas
If cell contains
Cell contains one of many things
Categorize text with keywords
Count cells that contain specific text
Highlight cells that contain
Value exists in a range
Count cells that contain either x or y
To check if a cell contains specific text, you can use the SEARCH function together with the ISNUMBER function. In the generic version, substring is the specific text you are looking for, and text represents text in the cell you are checking.
In the example shown, the formula in D4 is:
=ISNUMBER(SEARCH(C4,B4))
This formula returns TRUE if the substring is found, and FALSE if not.
Note: the SEARCH function will automatically find partial matches.
The SEARCH function returns the position of the search string when found, and the #VALUE! error if not. We use this fact to test when the search string is found by using the ISNUMBER function to "catch" valid numeric positions.
ISNUMBER returns TRUE for numbers and FALSE for anything else. So, if SEARCH finds the substring, it returns the position as a number, and ISNUMBER returns TRUE. If SEARCH doesn't find the substring, it returns a #VALUE! error, which causes the ISNUMBER to return FALSE.
If you want this formula to be case-sensitive, you can replace the SEARCH function with the FIND function like so:
=ISNUMBER(FIND(substring,text))
If you want to do something when a cell contains specific text, you can wrap the formula in an IF statement like this:
=IF(ISNUMBER(SEARCH(substring,text)), "Yes", "No")
Instead of returning TRUE or FALSE, the formula above, will return "Yes" if substring is found and "No" if not.
To test a cell for a single hardcoded substring, just enclose the text in double quotes. For example, to check A1 for the text "apple" use:
=ISNUMBER(SEARCH("apple",A1))
If you need to test a cell for more than one thing (i.e. for one of many substrings), see this example formula.
See more related formulas below.