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:
- Press Ctrl+H to display the Replace tab of the Find and Replace dialog box.
- Expand the dialog box by clicking the Options button. (See Figure 1.)
- Click the Format button at the right side of the Find What box. Excel displays the Find Format dialog box.
- Make sure the Fill tab is selected. (See Figure 2.)
- Use the controls in the dialog box to specify the background color you want to replace.
- Click OK.
- Click the Format button at the right side of the Replace With box. Excel displays the Replace Format dialog box.
- Make sure the Fill tab is selected.
- Use the controls in the dialog box to specify the background color you used when changing the cells.
- Click OK.
- Click Replace All.
Figure 1. The Replace tab of the Find and Replace dialog box.
Figure 2. The Fill tab of the Find Format dialog box.
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
Note: This article is taken from
https://excelribbon.tips.net/T009043_Replacing_Background_Colors_in_Cells.html
https://excelribbon.tips.net/T009043_Replacing_Background_Colors_in_Cells.html
No comments:
Post a Comment
Please Comment Here!