How do I have a cell highlight when selected?

R

Rhonda

How do I automatically have a cell highlight when it is selected, regardless
to where the location is in the spreadsheet?
 
R

Rhonda

Jim,

Thanks for the prompt response, I'm somewhat new at this where do I find and
insert the code in the workbook? Do I insert exactly what is written?

Rhonda
 
C

Carim

Hi Rhonda,

Use the following code :

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

This code is to be inserted into the worksheet module ...
Left click on your worksheet tab
Select view
Paste the above code...
You are all set ...

HTH
Cheers
Carim
 
G

Gord Dibben

Typo patrol.........I found one instead of creating one<g>

Make that.........Right-click on the worksheet tab and paste the code.


Gord Dibben MS Excel MVP
 
C

Carim

Thanks for correcting me ...

How much is the fine charged by the "typo patrol" ... ???

Cheers

Carim
 
D

ddate

I had a similar question. Is there a way to keep each cell highlighted once
they are selected versus this code which only highlights the active cell?

It's helpful when we have data on an Excel worksheet that we are manually
entering into another system to know which cells we have already done.

Thanks.
 
G

Gord Dibben

Fortunately..........nothing.

Otherwise I would be destitute and reduced to Alpo once a day.


Gord
 
R

Rhonda

Fantastic, it works! I'm like a child at Christmas, thank you soooo much
Carim!

Rhonda
 
R

Rhonda

Thanks Gord, I did that after I realized that the left did not give me
options, you guys are great, thanks again!

Rhonda
 
J

Jewelzz

I have a similar problem/question. My active cell no longer has a 'box'
around it so I know it's active, how do I get that feature back?

TIA,
Jewelzz
 
M

Mark

This works but how do I make it global rather than for an individual
worksheet? Previous versions of Office always highlighted the selective
active cells, but Office 2007 has it in some kind of barely noticeable
off-white color.
 
P

perezcathy

Carim said:
Hi Rhonda,

Use the following code :

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

This code is to be inserted into the worksheet module ...
Left click on your worksheet tab
Select view
Paste the above code...
You are all set ...

HTH
Cheers
Carim
 
Top