Search For Text In Excel

Publication Date :

Blog Author :

Edited by :

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

Table Of Contents

arrow

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.

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
You are free to use this image on your website, templates, etc.. Please provide us with an attribution link

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)

1

Can I Search for Text in Excel in another sheet?

Arrow down filled
2

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

Arrow down filled
3

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

Arrow down filled