How do I have a cell highlight when selected?

G

Guest

Is there a way to click on any cell either with tab or arrow key and that
cell automatically highlights in a color such as red? This is requested so
that if a person is working in a long spreadsheet with alot of statistics,
they will be able to see the cell that they have selected as it will be
highlights. I tried to create a macro but could not figure out how to make
it automatically highlight a cell when selected throughout the spreadsheet.
Any help or suggestions will be greatly appreciated? Any other solutions
will be greatly appreciated!
 
Z

Zone

Rhonda,
This will change the interior color of the activecell to red whenever
the selection changes, regardless of how the cell was selected. Only
problem, it removes the interior color of all the other cells every
time to prevent leaving a trail of red cells. That means if you have
some other interior colors on your sheet, you will lose them. If you
want to use it, copy this code and paste it into the worksheet's module
(right-click on the worksheet's tab, select view code, and paste it in
there). James

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

Guest

You could use the following in the worksheet module for the sheet you want
the highlight to occur in. However, as you move through the worksheet, the
active cell has its interior set to blue, while all the other cells in the
workbook have a white interior, and this will replace all shading formatting
in the worksheet.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Dim ws As Worksheet

Set ws = Worksheets("CA RESULTS")
ws.Cells.Interior.Color = vbWhite

ActiveCell.Interior.Color = 127

Set ws = Nothing

End Sub
 
D

Dave Peterson

You have other replies at your other post.
Is there a way to click on any cell either with tab or arrow key and that
cell automatically highlights in a color such as red? This is requested so
that if a person is working in a long spreadsheet with alot of statistics,
they will be able to see the cell that they have selected as it will be
highlights. I tried to create a macro but could not figure out how to make
it automatically highlight a cell when selected throughout the spreadsheet.
Any help or suggestions will be greatly appreciated? Any other solutions
will be greatly appreciated!
 

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