highlighted cell color


G

Guest

In Excel 2007 when I click and highlight a croup of cells, the background
color is "annoying". How can I change it so whenever I select a group of
cells they are highlighted in a color I would prefer.

I know I can change the background of cells, I just want to change the color
that they turn whenever any cells in the workbook are highlighted.
 
Ad

Advertisements

G

Guest

Try this little event macro:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = xlNone
Target.Interior.ColorIndex = 6
End Sub
 
G

Guest

Thanks Gary, can you give me step by step how to use this macro, I can't seem
to get it to work.
 
G

Gord Dibben

It is event code, not a macro.

Right-click on the sheet tab and "View Code".

Copy/paste the code into that sheet module.

Any cell or cells selection will cause the cell(s) to become yellow.

Just a note: if you have previously colored cells with a background color,
this code will wipe out that background.


Gord Dibben MS Excel MVP
 
Ad

Advertisements


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