give this a try.....
on a side note....before the Moderators let you know....you should be wrapping your code in code tags...makes it easy to read and copy, so we can help you better/faster...thanks...
Public val As Variant
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
If Target.Count > 1 Then Exit Sub
Set rng = Union(Range("J:J"), Range("W:W"))
If Not Intersect(Target, rng) Is Nothing Then
If Target <> val And val <> "" And And Target <> "" Then
Target.Interior.ColorIndex = 28
End If
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim rng As Range
If Target.Count > 1 Then Exit Sub
Set rng = Union(Range("J:J"), Range("W:W"))
If Not Intersect(Target, rng) Is Nothing Then
val = Target
End If
End Sub
Bookmarks