How do I have a cell highlight when selected?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I automatically have a cell highlight when it is selected, regardless
to where the location is in the spreadsheet?
 
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
 
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
 
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
 
Thanks for correcting me ...

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

Cheers

Carim
 
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.
 
Fortunately..........nothing.

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


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

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

Rhonda
 
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
 
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.
 
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
 
Back
Top