Find and Replace a color

R

Ronnie

I have been asked this by two different people in the past
two weeks! Does anyone know how to quickly find all cells
that are filled in yellow (for example) and change them
all to purple (or white, or whatever)? Not conditional
formats, but actual cell formats. This is driving me
bonkers.
 
D

Don Guillett

something like this. Modify to suit.
for each c in selection
if c.interior.colorindex=3 then c.interior.colorindex=4
next
 
S

SidBord

Maybe someone has a better solution, but as far as I can
tell you are going to have to write a Visual Basic macro to
do the job. You need to learn VBA anyway, so this is a
good opportunity.
 
G

Gord Dibben

Ronnie

Excel cannot do this by itself.

Go to Chip Pearson's website and copy/paste the Function CellColorIndex to a
module in your workbook.

You can find the colorindex number of your colored cells and change, count,
sum or whatever.

http://www.cpearson.com/excel/colors.htm

Gord Dibben Excel MVP
 
Top