Elite Membership

Search For Text In Excel

Written by Jeevan A Y Jeevan A Y Freelance Writer Jeevan, a seasoned data expert with 7 years in MIS reporting, excels in Advanced Excel, VBA, Power BI, and SQL. Currently an Assistant Manager MIS, his insightful data storytelling drives swift decision-making. 7+ years of experience MBA (Finance & Marketing) MIS Reporting View Full Profile
Reviewed by Dheeraj Vaidya, CFA, FRM Dheeraj Vaidya, CFA, FRM Content Reviewer & Course Director Dheeraj is a former J.P. Morgan and CLSA Equity Analyst with nearly two decades of experience in financial modeling, valuation, equity research, and corporate finance. He specializes in helping students and professionals develop practical and in-demand finance skills through structured and AI-powered, 20+ Years of experience CFA, FRM, IIT Delhi, IIM Lucknow Financial Modeling View Full Profile
Updated Dec 20, 2024
Read Time 6 min

How To Search For Text In Excel?

Search for Text in Excel helps us find cell values with Text or strings. We can replace the text with the desired text, strings, or characters. The usual method to search for a specific text in the worksheet is theย โ€œFind and Replaceโ€ method.

Download FREE Search For Text In Excel Template and Follow Along!
Download Excel Template

For example, we can perform the Excel Search for text using some of the inbuilt functions in Excel, such as COUNTIF(), FIND(), SEARCH(), etc., as shown in the below image.

Search For Text In Excel

Here, we will take you through the formulas to search for the particular text in the cell value and arrive at the result.

Key Takeaways

  • Search for Text in Excel helps users searchfor a specific word or a text in a sentence or a cell value with strings, and also replace it with another text if necessary.
  • We can identify the text strings using some of the methods, namely,
  • โ€œFind & Replaceโ€ ร  first, we find the required word, and then replace it with a new text.
  • Excel formulas ร  We can use some inbuilt Excel formulas such as FIND() and SEARCH() to find text, ISNUMBER(), and ISTEXT() to identify the cell values as text and return logical Boolean values.
  • We can create a rule using the Conditional Formatting method and highlight the required text.

Which Formula Can Tell Us A Cell Contains Specific Text?

A few formulas that help us identify text cells are, โ€œFINDโ€ function, ISNUMBER function, IF Condition, ISERROR function, etc. We will take you through the formulas to search for the particular text in the cell value and arrive at the result.

#FIND function

It can return the position of the supplied text values in the string. So, if the FIND method returns any number, then we can consider the cell as it has the text or else not.

  1. For example, look at the below data.


    Search For Text Excel Example 1

  2. Here, we have three sentences in three different rows. Now in each cell, we need to search for the text โ€œBestโ€. So, apply the FIND function.


    Search For Text Excel Example 1-1

  3. The โ€œfind_textโ€ argument mentions the text we need to find.


    Search For Text Excel Example 1-2

  4. For the โ€œwithin_textโ€, select the full sentence, i.e., cell reference.


    Search For Text Excel Example 1-3

  5. The last parameter is not required. Now, close the bracket, press the โ€œEnterโ€ key, and drag the formula from cell B1 to B3 using the fill handle. The output is shown below.


    Search For Text Excel Example 1-4

    So, cells A1 and A3 have the word โ€œbestโ€. We can see theย #VALUE! errorย in cell B2, which shows that cell A2 does not have the text value โ€œbestโ€.

  6. Instead of numbers, we can also enter the result in our own words. For this, we need to use the IF condition, as shown below in the formula bar.


    Search For Text Excel Example 1-5

  • So, in the IF condition, we have supplied the result as โ€œText Foundโ€ if the value โ€œbestโ€ is found. Otherwise, we have provided the result as โ€œNot Foundโ€.
  • But, here we have a problem, even though we have supplied the result as โ€œNot Foundโ€, if the text is still not found, we are getting the error value asย #VALUE!.

To fix the error we must enclose the ISNUMBER function, as shown below.

Search For Text Excel Example 1-6

The ISNUMBER function evaluates whether the FIND function returns the number or not. If the FIND function returns the number, it will supply TRUE to the IF condition or else FALSE condition. Based on the result provided by the ISNUMBER function, the IF condition will return the result accordingly.

We can also use the IFERROR function in excel to deal with error values instead of ISNUMBER. For example, the below formula will also return โ€œNot Foundโ€ if the FIND function returns the error value.

Search For Text Excel Example 1-7

Alternatives To the FIND Function

We considered the Find & Replace option, or the FIND function, to Search for Text in Excel. Now, we will see other alternative methods or functions available, such as,

  1. Excel Search Function.
  2. Excel COUNTIF Function.

Alternative #1 โ€“ Excel Search Function

Theย SEARCH function in excelย helps us to search the particular text in the string.

The syntax of the SEARCH function is the same as the FIND function.

Alternative to FIND Function 1

Supply the โ€œfind_textโ€ as โ€œBestโ€.

Alternative to FIND Function 1-1

The โ€œwithin_textโ€ is our cell reference.

Alternative to FIND Function 1-2

Even the SEARCH function returns an error value asย #VALUE!ย If the finding text โ€œbestโ€ is not found. As seen above, we must enclose the formula with ISNUMBER or IFERROR functions.

Alternative #2 – Excel Countif Function

Another way to search for a particular text is using the COUNTIF function. This function works without any errors.

Alternative to FIND Function 1-3

In the range, the argument selects the cell reference.

Alternative to FIND Function 1-4

In the criteria column, we need to use a wildcard in excel because we are just finding the part of the string value, so enclose the word โ€œbestโ€ with an asterisk (*) wildcard.

Alternative to FIND Function 1-5

This formula will return the word โ€œbestโ€ count in the selected cell value. Since we have only one โ€œbestโ€ value, we will get only 1 as the count.

Alternative to FIND Function 1-6

We can apply only the IF condition to get the result without error, as shown below.

Alternative to FIND Function 1-7

Highlight The Cell Which Has A Particular Text Value

As another alternative method, instead of using the Excel functions, we can use the โ€œConditional Formattingโ€ option to highlight the cell with a particular word.

For example, to highlight the cell with the word โ€œbest,โ€ we need to useย conditional formatting in excel.

First, select the data cells and click โ€œConditional Formattingโ€ > โ€œNew Ruleโ€.

Alternative to FIND Function 2

Under โ€œNew Ruleโ€, select the โ€œFormat only cells that containโ€ option.

Alternative to FIND Function 2-1

From the first dropdown, select โ€œSpecific Textโ€.

Alternative to FIND Function 2-2

The formula section enters the text we search for in double quotes with the equal sign. =โ€˜bestโ€™.

Alternative to FIND Function 2-3

Then, click on โ€œFORMATโ€, and choose the formatting style.

Alternative to FIND Function 2-4

Click โ€œOKโ€. It will highlight all the cells which have the word โ€œbestโ€.

Alternative to FIND Function 2-5

Using various techniques, we can search the particular text in Excel.

Important Things To Note

  • We can Search for Text using various methods using formulas or โ€œConditional Formattingโ€.
  • We can use the shortcut keys, Ctrl + F, to find the text we are looking for but cannot go beyond that. So, for example, if the cell contains certain words, we may want the result in the next cell as โ€œTRUEโ€ or โ€œFALSEโ€. So,ย Ctrl + Fย stops there.

Frequently Asked Questions (FAQs)

Can I Search for Text in Excel in another sheet?

Yes, we can Search for Text in Excel in another sheet using the VLOOKUP, HLOOKUP and the XLOOKUP functions. Here, we will select the text to be searched as the lookup_value.

Name a few functions that help to Search for Text in Excel.

Some of the Excel functions that help us Search for Text are FIND(), ISNUMBER(), IF Condition, SEARCH(), COUNTIF(), etc. We can use the โ€œConditional Formattingโ€ method, which helps us create a rule to highlight the words to search or find in a sentence.

Do we have a formula to Search for Text in Excel?

Yes, we have an inbuilt formula to Search for Text in Excel.

The syntax is,

=SEARCH(find_text,within_text,)

The arguments are,

  • find_text:ย It is the substring/character to search within a string or the text. It is mandatory.
  • within_text: It is the cell reference where we have to look for the substring. It is mandatory.

It tells from where or which characterโ€™s place theย search must begin. If not provided, the function, by default, considers as 1 and starts the search from the first character of the selected cell.

This article is a guide to Search For Text in Excel. Here we find Text values, FIND, SEARCH, COUNTIF, Conditional Formatting, examples & downloadable template. You may learn more about Excel from the following articles: –