rob_sheeds
Board Regular
- Joined
- Dec 9, 2010
- Messages
- 57
Hi and thanks in advance. Got this code from another forum and it doesnt work. It changes sheets but nothing happens.
I would like to Find and Replace a fill colour using RGB, in ALL cells in ALL sheets in ALL open workbooks, regardless of any other formats on the cell.
[Sub ChangeFormats()
With Application.FindFormat.Interior
.Color = RGB(191, 191, 191)
End With
With Application.ReplaceFormat.Interior
.Color = RGB(242, 242, 242)
End With
For Each aSheet In ActiveWorkbook.Worksheets
aSheet.Activate
Cells.Replace What:="", Replacement:="", LookAt:=xlPart, SearchOrder:= _
xlByRows, MatchCase:=False, SearchFormat:=True, ReplaceFormat:=True
Next aSheet
End Sub]
I would like to Find and Replace a fill colour using RGB, in ALL cells in ALL sheets in ALL open workbooks, regardless of any other formats on the cell.
[Sub ChangeFormats()
With Application.FindFormat.Interior
.Color = RGB(191, 191, 191)
End With
With Application.ReplaceFormat.Interior
.Color = RGB(242, 242, 242)
End With
For Each aSheet In ActiveWorkbook.Worksheets
aSheet.Activate
Cells.Replace What:="", Replacement:="", LookAt:=xlPart, SearchOrder:= _
xlByRows, MatchCase:=False, SearchFormat:=True, ReplaceFormat:=True
Next aSheet
End Sub]