Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Highlighting Cells Containing Specific Text.

Highlighting Cells Containing Specific Text

by Allen Wyatt
(last updated June 2, 2017)


You can use the conditional formatting feature in Excel to help draw attention to cells that contain specific text in which you are interested. For instance, if you have a range of cells and you want to know which ones contain the letters "shawn," then you can do the following:

  1. Select the range of cells.
  2. Choose Conditional Formatting from the Format menu. Excel displays the Conditional Formatting dialog box.
  3. In the drop-down Condition list, choose "Formula Is". (See Figure 1.)
  4. Figure 1. The Conditional Formatting dialog box.

  5. In the formula box, enter the following formula. (Make sure you replace A1 with the cell address of the cell in the upper-left corner of the range selected in step 1.)
  6.      =NOT(ISERR(SEARCH("shawn",A1)))
  7. Click on Format. Excel displays the Format Cells dialog box. (See Figure 2.)
  8. Figure 2. The Format Cells dialog box.

  9. Using the controls in the dialog box, specify a format that you want used for those cells that contain the specified text. For instance, you may want bold text in a red typeface.
  10. Click on OK to close the Format Cells dialog box.
  11. Click on OK to close the Conditional Formatting dialog box.

You can make this approach even more general-purpose in nature by specifying a cell that contains what you want to search for. For instance, if you type "shawn" in cell F7, then you could replace the formula in step 4 with the following:


Now, you can search for something different just by changing the characters in cell F7.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2671) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Highlighting Cells Containing Specific Text.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...


Colors and Fonts for Worksheet Tabs

Changing the color used on a worksheet tab is easy. Just follow the three steps in this tip.

Discover More

Hiding Outline Symbols

Outline symbols are automatically displayed by Excel when you add subtotals or organize your data using an outline. If ...

Discover More

Changing Multiple Cells at Once

Excel includes several different methods of editing information in your cells. If you want to edit multiple cells all at ...

Discover More

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

More ExcelTips (menu)

Counting Colors from Conditional Formats

Conditional formatting is a great way to make sure that your information looks a particular way, even if the information ...

Discover More

Detecting Errors in Conditional Formatting Formulas

If an error exists in a formula tucked inside a conditional format, you may never know it is there. There are ways to ...

Discover More

Understanding Conditional Formatting Conditions

Conditional formatting can be a great way to highlight specific information in your worksheets. This tip explains the ...

Discover More

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.


If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is one minus 1?

2016-04-07 17:22:55

Phyllis Hawkins

every time I type a specific word in a specific cell using Excel 2013 it is replaced with different word. This happens with EVERY NEW document opened.

EX: in cell B1; the word "Title" is typed and then hit enter. The word automatically changes to "Executive Director". I have checked the backstage option in AutoCorrect and this is not listed.

2015-11-05 16:25:45



How do I highlight columns C-F if A contains "Site Identified"? Not if A equals "Site Identified", I am aware of how to do that. Thank you!


2015-07-29 18:01:10


Instead of highlighting, is it possible to ask for a password when a certain word is typed? Example I don't like the word "apple" in my file so whenever I type apple, a prompt will come up asking for an override password. Thanks for the help :)

2015-06-20 06:15:58


I want to automatic display "Insert rate" in blank cells backgroun, can it is possible

2015-06-06 03:49:59


i want to highlight the cell e.g A9
and specified text look up area is B9 to Z9

is their any rule to do it.

2015-05-12 17:53:45


I have two sheets in a workbook.Sheet1 has a list of potential numbers in column B. Sheet2 is a list of numbers used listed in column B, a description in column C, a city in column D, Size in E, Color in F and Priority in G. I used VLOOKUP to populate Sheet1 B with the dscription from column B matching number in Sheet2.... =IFERROR(VLOOKUP(B5,'Sheet2'!B:C,2,0),"").
I would like to high-light the descriptions of the high priority items red, and lower priority yellow. How can I Highlight a field... if Sheet1 B2 = 1234 and Sheet2 number 1234 column F = High Priority, highligh Sheet1 B2 Red?

2015-03-26 08:36:18

Willy Vanhaelen

The formula to use is: =Left(A1,1)="7"

This works with numeric data as well as text.

2015-03-26 04:46:28


Hi there,

I want to apply conditional formatting for cells (in column A) where the first number is 7. Can you please advise how to do that?

2015-03-21 06:08:38

Michael (Micky) Avidan

Btw, I warmly recommend that you check the new feature of CF as per partially/specific text - new feature in "Excel 2007" and above:
Michael (Micky) Avidan
“Microsoft® Answers" - Wiki author & Forums Moderator
“Microsoft®” MVP – Excel (2009-2015)

2015-03-21 06:00:46

Michael (Micky) Avidan

1) To my opinion, Allen's formula is the most suitable because it is not Case sensitive (all strings can be typed in Upper/Lower characters).
2) However, his suggested CF formula can be considerable shorter because the ISERROR check is not needed because any mismatching will result as: #VALUE! which will NOT trigger the CF.
Any match (regardless its position within the text) will end up with a positive number. Any positive number will be interpreted, by the CF rule, as TRUE.
This is the CF formula I have in mind: =FIND(F7,A7)
I hope I made myself clear.
Michael (Micky) Avidan
“Microsoft® Answers" - Wiki author & Forums Moderator
“Microsoft®” MVP – Excel (2009-2015)

2015-03-20 06:22:12

Willy Vanhaelen


If your data is in column A this formula should do:

=FIND("your text",LOWER(A1))

Note that "your text" should be lower case.

2015-03-19 07:37:42


Hi< I was wanting to do the same as Barbara posted on 21st jan; that is highlight cells that contain a text string that will also contain other text

2015-03-17 06:45:54

Willy Vanhaelen

Supposing your data are in column B, this formula should do:

2015-03-16 15:17:23


Im looking for a way to highlight cells if the contain a y or n or o.

thank you

2015-02-08 05:52:40

Willy Vanhaelen

See to it that there are no dollar sings ($)in the formula.

So it should be: =AND(B1<>"Yes",B1<>"Disabled")

2015-02-07 12:02:58


Thanks for your help
I used it, but its working properly.
Even if there are any other values in the column or blanks, its all getting formatted based on what value I am having on the first cell (B1).
If I am changing the values in the B1 cell, all the cells in the column are also effected.
Does it has something related to chaging the cell value or cell selection range? Can you please help?

2015-02-02 05:32:59

Willy Vanhaelen

If those data are in column B, highlight that column.
The formula to enter in the conditional format dialog is:

2015-02-01 06:05:47


I have data in a column for 1000 cells. There is 6 types of data.They are - Yes, No, Disabled, Enabled, -, 0. There may be blank cells also in between. Those cells not containing Yes or Disabled, should be highlighted with some colour. I am not able to find a suitable formula to use for conditional formatting these cells in the column. Can anyone please help?

2015-01-30 16:04:19

B Gomez

It was very helpful! Thank you very much :)

2015-01-21 15:52:34


Hi...I am trying to use Cond Formatting for cells that contain a specific word...possibly embedded within other text. Is this possible?

2013-12-16 19:04:23



Thanks for this. Using 2003 things take a little more 'thought' and I was trying to do the above via COUNTIF but couldn't get it to be specific enough on the search so it was highlighting every cell.

This worked first time.


2013-02-07 06:12:15

Barry Fitzpatrick


I don't know if you've resolved this yet.

Select the range A3:A2000 then put the formula:


as the Conditional Formatting "Formula Is" (Excel 2003) or "Use a formula to determine which cells to format" in Excel 2010, then setting the desired format to highlight the matching values.

This works by seeing if each cell in the range A3 to A2000 matches a cell value in P3 to P200 using the MATCH function. If there is a match the function return a value corresponding to the position of the matched value in the P3:P200 range; if no match it return #N/A. The ISNA function looks for this which would give a TRUE if the MATCH function returns #N/A, the NOT turns this into a FALSE so that the conditional format is invoked by matching value.

2013-02-06 18:36:42


Wow! Great way of thinking and very easy to apply.

2012-05-22 20:54:23


Fantastic tip. Exactly what I needed and very easy to follow. Thanks!

2012-02-13 01:53:55

buddy bandol

hi please help me to solve on how will i use highlighting for ex. i have data on a cell a3 up a2000 i want that data will be highlighted if i put same data on a cell p3 upto p200. is it posible?

This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.