Is it possible to automatically change cell background colours?

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

I have a worksheet of 1000 names with background fill colours in the cells
denoting different things. Is it possible to change, say, all the reds to
green, and all the greens to yellow?

Thanks

Mike
 
You could do this by changing your colour pallette or via code
Here's an example

Sub Change_Colours()
const Red = 3
const Green = 4
const yellow = 6
for each c in activesheet.usedrange
select case c.interior.colorindex
case red
c.interior.colorindex = green
case green
c.interior.colorindex = yellow
case else
end select
next
end sub
 
Back
Top