Hello all,

I am using Excel 2007.
I am trying to change the background color of all cells with a certain background by using a macro.

So far, I came up with this:

Sub changecolor()

If ActiveCell.Interior.Color = RGB(255, 51, 51) Then
ActiveCell.Interior.Color = RGB(146, 208, 80)
End If

End Sub

But this only changes the color of a selected cell.
How can I change all cells instead of only the selected?
Many thanks in advance!

Kevin