cell or column highlights when other cell is selected

T

Tropicana

Hi,
I'm using Office 2003 and hoping for an answer.
What I want to do is have either a cell or column highlight when another
cell is chosen.
For example when I select E4 then column J would highlight, or I select E4
and J4 would highlight.
Are either of these possible?

Tropicana
 
L

Luke M

You could do something like this. On sheet you want this to happen, right
click on sheet tab, view code, paste this in. This will highlight column J
when E4 is selected.


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$E$4" Then
Range("J:J").Interior.ColorIndex = 6 ' YELLOW
Range("J:J").Interior.Pattern = xlSolid
Else
Range("J:J").Interior.ColorIndex = 0
End If
End Sub
 

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