WPS Office

Free All-in-One Office Suite with PDF Editor


Edit Word, Excel, and PPT for FREE.


Read, edit, and convert PDFs with the powerful PDF toolkit.


Microsoft-like interface, easy to use.

Free download

Windows • MacOS • Linux • iOS • Android


How to find if cell contains specific text in Excel

December 13, 2022

Conditions in Excel could call for verifying whether a cell has a particular text or not. Today, we'll demonstrate how to determine whether a cell includes a particular piece of text.

Let's learn more about the dataset that serves as the foundation for our examples first.

A table with the names and grades of various pupils is available. We will use this dataset to determine whether or not a cell includes a particular text.

To keep things easy, take note that this is a rudimentary dataset. In a real-world situation, you can come across a much bigger and more complicated dataset.

Let’s have a closer look at how to find if cell contains specific text in excel.

Cell contains specific text only in excel: 

A cell that may or may not contain exactly the text (string) we're looking for can be searched through. There won't be any more conditions attached.

For instance, every cell in our dataset's Grade column has the words Passed or Failed. There are no extra words or strings present. This allows us to determine whether a cell in this column has the words Passed or Failed.

For instance, in this case, we will determine whether the word Passed is present in a cell before adding a comment to the newly added Remarks column.One of the first functions that comes to mind when you hear words like check is IF. When a logical test is run, the IF function returns a binary value (TRUE or FALSE).To check whether the cell includes the exact text Passed or not, let's create the formula using the IF statement.=IF(D4=Passed,Promoted,)

Here, the logical operation D4=Passed checks whether or not the D4 contains the word Passed.Promoted will display as a result after it discovers the cell has the text because Promoted has been set as the if true value. There is currently no if false value available.

The formula returns the if true value because the D4 cell contains the search term Passed.Write the formula for the remaining cells now. The AuoFill function can also be used.

As you can see, our formula accurately returned Promoted for the cells that include Passed when the condition was true.This functions without regard to case. It will still function if any of the cells have passed rather than Passed.

Cell contains specific text (partial match) in excel:

Sometimes it may be necessary to conduct a substring search for a certain text within a cell. How to do that will be covered in this section.For illustration, we will look for a string (group name) within the ID column's cells.

Here, we've added a few columns that go with the setting of our example.

Note: This above written article is an attempt to show you how to find if cell contains specific text in excel online, 2016 and 2019, in both windows and mac.You just need to have a little understanding of how and which way things work and you are good to go. With having this basic knowledge or information of how to use it, you can also access and use different other options on excel or spreadsheet. Also, it is very similar to Word or Document. So, in a way, if you learn one thing, like Excel, you can automatically learn how to use Word as well because both of them are very similar in so many ways. If you want to know more about WPS Office, you can download WPS Office to access, Word, Excel, PowerPoint for free.                                    

15 years of office industry experience, tech lover and copywriter. Follow me for product reviews, comparisons, and recommendations for new apps and software.