The difference is that the SEARCH function supportswildcardsbut isnotcase-sensitive, while the FIND functioniscase-sensitive butdoes notsupport wildcards.

error when the substring is not found.

The standard approach is to wrap these functions in the ISNUMBER function to force a TRUE or FALSE result.

Excel formula: Cell contains specific words

Excel 365 nowsupports regular expressions(regex), a powerful tool for pattern-matching.

TheREGEXTEST functionoffers a direct way to test for specific text with a TRUE or FALSE result.

Because REGEXTEST uses regex, it can be configured to use precise patterns for advanced use cases.

Excel formula: Cell begins with

See below for basic examples.

If SEARCH finds the substring, it returns thepositionof the substring in the text as a number.

If the substring is not found, SEARCH returns a #VALUE error.

Excel formula: Cell ends with

For example:

To force a TRUE or FALSE result, we use theISNUMBER function.

ISNUMBER returns TRUE for numeric values and FALSE for anything else.

Wildcards

Although SEARCH isnotcase-sensitive, it does supportwildcards(*?~).

Excel formula: If cell contains

For example, the question mark (?)

wildcard matchesany one character.

This wildcard is not as useful in the SEARCH function because SEARCHalready looks for a substring.

Excel formula: Cell contains one of many things

), and tilde (~) in that order.

You are free to customize the values returned by IF as you like.

for one of many substrings),see this example formula.

Excel formula: Categorize text with keywords

SEARCH returns the position offind_textinsidewithin_textas a number.

When the text is not found, FIND returns a #VALUE error.

REGEXTEST Function

The Excel REGEXTEST function tests for the existence of text defined by a given pattern.

Excel formula: Highlight cells that contain

The result from REGEXTEST is TRUE or FALSE….

Excel formula: Count cells that contain either x or y

Excel SEARCH function

Excel ISNUMBER function

Excel FIND function

Excel REGEXTEST function