Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, and 2016. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Replacing Background Colors in Cells.

Replacing Background Colors in Cells

by Allen Wyatt
(last updated July 7, 2018)


Jozef is looking for a way to change background colors of specific cells in the worksheet he created. For example, he would like to find all red background cells and change them to blue, or find all yellow backgrounds and change them to blue. Jozef wonders if there is an easy way to do this.

It's fairly obvious that you can change the background colors of any cells manually, so there is no need to go into that option for making the changes. What you need to do is use a simple tool, such as the Find and Replace tool, to make the color changes. Follow these steps:

  1. Press Ctrl+H to display the Replace tab of the Find and Replace dialog box.
  2. Expand the dialog box by clicking the Options button. (See Figure 1.)
  3. Figure 1. The Replace tab of the Find and Replace dialog box.

  4. Click the Format button at the right side of the Find What box. Excel displays the Find Format dialog box.
  5. Make sure the Fill tab is selected. (See Figure 2.)
  6. Figure 2. The Fill tab of the Find Format dialog box.

  7. Use the controls in the dialog box to specify the background color you want to replace.
  8. Click OK.
  9. Click the Format button at the right side of the Replace With box. Excel displays the Replace Format dialog box.
  10. Make sure the Fill tab is selected.
  11. Use the controls in the dialog box to specify the background color you used when changing the cells.
  12. Click OK.
  13. Click Replace All.

If you find yourself needing to make the same color changes over and over (for instance, always changing from red to blue), then you may be interested in using a macro to do the changes. The following example could be assigned to a shortcut key or added to the Quick Access Toolbar so you can use it quickly:

Sub ChangeColor()
    Dim rCell As Range
    If Selection.Cells.Count = 1 Then
        MsgBox "Select the range to be processed."
        Exit Sub
    End If
    For Each rCell In Selection
        If rCell.Interior.Color = RGB(255, 0, 0) Then  'red
            rCell.Interior.Color = RGB(0, 0, 255)      'blue
        End If
    Next rCell
End Sub


If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9043) applies to Microsoft Excel 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Excel here: Replacing Background Colors in Cells.

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. ...


Clearing All Tab Stops

Tab stops allow you to modify the horizontal position at which text is positioned on a line. If you want to get rid of ...

Discover More

The Case of the Disappearing Icons

Troubleshooting your custom icons on the Toolbar.

Discover More

Displaying Table Gridlines

For those times when you remove the borders from your tables, Word provides a way that you can display non-printing ...

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

More ExcelTips (ribbon)

Changing Cell Patterns

You can shade your cells by filling them with a pattern. Here's how to select the pattern you want used.

Discover More

Using Fractional Number Formats

If you want information to display on the screen using fractions instead of decimals, you're in luck. Excel provides ...

Discover More

Number Formatting Shortcuts

Keyboard shortcuts can save time and make developing a workbook much easier. Here's how to apply the most common of ...

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 four more than 2?

2018-09-21 17:13:25


At the top you say this article was written for several versions of Excel including 2013 which is my version. However I don't have a format button next to Find What. The only format button is at the bottom of the Replace tab under the Replace section. So... doesn't work. Thank you though for something to try.

2016-09-23 20:11:34



I tried this and it works.

Sub ChangeColour()
Dim rng2Colour As Range

Set rngRef = Selection(1)
InteriorColour = Selection(1).Interior.Color
Set rng2Colour = Selection

rng2Colour.Interior.Color = InteriorColour

End Sub

The ref cell was selected first the pressing ctrl i selected the range to colour and press run.

Should be quicker, no looping.


2016-09-21 16:48:19

Jay Grace

I am trying to change the fill color of any cell that have a light peach color to a darker peach color. I highlighted the column first. The problem is I get the following error:

"Microsoft Office Excel cannot find any data to replace. Check if your search formatting and criteria are defined correctly."

I copied the formatting from one of the original cells in both format boxes and only changed to a darker color.

2016-08-24 09:41:21


Christine & Julie - I had the same problem. Try checking the box "Match entire cell contents". This worked for me.

2016-05-21 03:58:45


Thanks for the information. It worked perfectly.

2016-04-07 13:27:52


This only replaces the color for empty cells, how do you find cells with data and replace them with the same data?

2016-01-29 09:19:10


FINALLY - A simple solution with the find and replace. I just wanted to add a value to shaded cells so that I create a chart. After foaming at the mouth with lots of macro instructions, the find and replace worked perfectly.

2015-11-04 09:26:48


Thank you VERY MUCH this was a perfect fix for me. I work on changes to sheets with over 50,000 cells and this tip has saved me hours! Thank you again for taking the time to share!

2015-10-08 17:24:15


replacing fill color is not working. I keep getting the message that it cannot find any cells with this color -- and my spreadsheet it loaded with this particular color. I even "choose format from cell". And it still can't find it! I even manually changed some of the cells to a different color fill and then tried to replace the new color -- and still it said it could not find anything to replace.

2015-08-17 10:33:04


is there any option to find a set of numbers in excel. for example

1 5 3 7 9
3 4 6 7 8
4 6 8 9 2
66 75 23 14 15

if i want to find the combination 1 5 3 7 9 what should i do? is there any way to find the same set of number which is in a different order ie 5 1 9 7 3? please help me?

2015-05-06 09:41:36


I'm looking for a way to change the color or add a boarder of the selected cell when using. For example; when I'm searching a large spreadsheet its difficult to see which box is highligted

2014-09-24 04:39:47


hello good afternoon, i would like to ask how to hyperlink the background color inorder for me to when i click the color and click another tab the color will change

2014-07-21 15:02:16


This worked like a charm and suddenly it has stopped working. I've tried to use it on multiple spreadsheets and it can never find what I'm looking for. I'm even using the "choose format from cell" option and same thing. I know there's probably something simple that I'm missing but I'm stumped.

2014-03-26 07:00:52


pradeep: this is not a bug. Conditional formatting is not the same as underlying cell formatting. Otherwise, you would not be able to apply both to a cell at the same time. Allen's tip only works for the latter type of formatting.

Besides, if you want to change all the cells that are conditionally-formatted to be red to instead be blue, just use the conditional format dialogue. It's just as easy as find/replacing the colors.

2014-03-26 00:10:34


Bug in excel 2010:
Does not work when you apply format through conditional formatting. Then try to choose the format for find/replace.

2014-03-10 09:42:11


This doesn't work for me. Every time I try, it tells me that excel can't find what I'm looking for. And I've double checked the colors I'm trying to find and everything.

2014-01-16 01:24:08


Clearly laid out and easy to follow, many thanks.

2014-01-08 04:24:11


I have already searched for this. Thank you!

2014-01-07 10:25:37


Thank you for this. It couldn't have been more clearly and simply set out and I found it very useful.

This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu 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.