Replacing hilite color

  • Thread starter Thread starter Tony Vella
  • Start date Start date
T

Tony Vella

I have a number of worksheets with some of the cells hi-lited bright yellow.
I find this rather hard on the eyes and would like to replace the bright
yellow hi-lite with grey. Can this be done automatically by some command?
I am using Excel 97 on an XP Home machine. Thanks in advance.
 
Hi Tony, Ottawa

Color palette is a workbook property. Try this little macro for a start, ran
from a yellow cell:

Sub Recolor()
Dim r As Long, g As Long, b As Long
Dim CelCol As Long
CelCol = ActiveCell.Interior.ColorIndex
If CelCol < 0 Then Exit Sub ' no color
r = Val(InputBox("How much red ?(0 - 255):"))
g = Val(InputBox("How much green ?(0 - 255):"))
b = Val(InputBox("How much blue ?(0 - 255):"))
ActiveWorkbook.Colors(CelCol) = RGB(r, g, b)
End Sub

(Several zeros or cancels will return black, so fill in sensible values)

Copying palettes from other workbooks can be done in the Tools > Options >
Color menu. For some theory on Excel color, see David's page
http://www.mvps.org/dmcritchie/excel/colors.htm

You may also consider upgading to 2007 in a year, that one will have lots of
color capabilities.

HTH. Best wishes Harald
 
Maybe you can do it manually.

Tools|Options|Color tab
select the color that you don't like (get the right one!)
click modify
choose a new color and ok you're way out.

This is a workbook setting, so if you always want to change the same color to
the same color, you could record a macro when you do it manually. Then just
rerun that macro when you need to.
 

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