Skip to main content

Excel Formula: Check if a cell contains a specific text

Here the tutorial provides some formulas to check if a cell contains a specific text and return TRUE and FALSE as below screenshot shown, and explains the arguments and how the formulas works.
doc check if cell contains specific text 1

Formula 1 Check if a cell contains a specific text (not case sensitive)

Generic formula:

=ISNUMBER(SEARCH(substring,text))

Arguments

Substring: the specific text you want to search in the cell.
Text: the cell or text string you want to check if contains a specific text (the argument substring)

Return value:

This formula returns a logical value. If the cell contains the substring, the formula returns TRUE, or it returns FALSE.

How this formula work

Here you want to check if cell B3 contains the text in C3, use below formula

=ISNUMBER(SEARCH(C3,B3))

Press Enter key to get the checking result.
doc check if cell contains specific text 2

Explanation

SEARCH function: the SEARCH function returns the position of first character of the find_text in the within_text, if it does not find the find_text, it will return #VALUE! error value. Here SEARCH(C3,B3) will find the position of text in cell C3 within cell B3, it returns 22.

ISNUMBER function: the ISNUMBER function will check if the value in cell is numeric value and return a logical value. Returning TRUE indicates the cell contains a numeric value, or return FALSE. Here ISNUMBER(SEARCH(C3,B3)) will check if the result of SEARCH function is a numeric value.

Formula 2 Check if cell contains a specific text (case sensitive)

Generic formula:

=ISNUMBER(FIND(substring,text))

Arguments

Substring: the specific text you want to search in the cell.
Text: the cell or text string you want to check if contains a specific text (the argument substring).

Return value:

This formula returns a logical value. If the cell contains the substring, the formula returns TRUE, or it returns FALSE.

How this formula work

Here you want to check if cell B4 contains the text in C4, use below formula

=ISNUMBER(FIND(C4,B4))

Press Enter key to check.
doc check if cell contains specific text 3

Explanation

FIND function: the FIND function gets the location of the first character of the find_text in the within_text, if it does not find the find_text, it will return #VALUE! error value, and it is case sensitive. Here FIND(C4,B4) will find the position of text in cell C4 within cell B4, and it returns #VALUE! error value..

ISNUMBER function: the ISNUMBER function will check if the value in cell is a numeric value and return a logical value. Returning TRUE indicates the cell contains a numeric value, or return FALSE. Here ISNUMBER(FIND(C4,B4)) will check if the result of FIND function is numeric value.

Sample File

doc sampleClick to download sample file


Relative Formulas


The Best Office Productivity Tools


Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations