Is it possible to automatically change cell background colours?

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
 
X

xlbo

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top