Written by Allen Wyatt (last updated March 26, 2022)
This tip applies to Excel 97, 2000, 2002, and 2003
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 is a way to make changes to all the cells at once. If you are using Excel 2002 or 2003 you can follow these steps:
Figure 1. The Replace tab of the Find and Replace dialog box.
Figure 2. The Patterns tab of the Find Format dialog box.
If you are using an older version of Excel, these steps won't work. Instead you'll need to use a macro to do the changes. The following is an example of one that should work. (You can also use this macro in later versions of Excel, as well.)
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
Note:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9042) 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: Replacing Background Colors in Cells.
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!
Borders on all sides of a cell are easy to do in Excel. You can also create diagonal borders that run right through the ...
Discover MoreExcel provides a variety of tools you can use to make your data look more presentable on the screen and on a printout. ...
Discover MoreAdding borders around cells is a common formatting task. You can make the task more intuitive by actually drawing the ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
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.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments