Find and Replace a color

  • Thread starter Thread starter Ronnie
  • Start date Start date
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.
 
something like this. Modify to suit.
for each c in selection
if c.interior.colorindex=3 then c.interior.colorindex=4
next
 
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.
 
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
 

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

Back
Top