Hello all,
I'd like to write a macro that selects all cells with a certain background. The color I'm looking for is (255,217,102). I want to select all cells in the sheet with this background color, and then change the value of these cells. I'm fairly certain this can be done, but I've never been great with VBA. This is what I'm trying so far:
0 is not the actual value I want but I've been using it to test.![]()
Sub fff() If Application.Cells.Interior.ColorIndex = RGB(255, 217, 102) Then Application.Cells.Value = 0 End If End Sub
Can someone please help me?











LinkBack URL
About LinkBacks
Register To Reply

Bookmarks