Log in  \/ 
x
or
x
x
Register  \/ 
x

or

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

Kutools for Excel - Helps You To Stand Out From Crowd

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 80% time for you.

  • Designed for 1500 work scenarios, helps you solve 80% Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 30-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.
Ribbon of Excel (with Kutools for Excel installed)

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, Firefox, And New Internet Explorer.
Screen Shot of Excel (with Office Tab installed)
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.