Private Sub Worksheet_Change(ByVal Target As Range)
Dim Fnd As Range
If Target.CountLarge > 1 Then Exit Sub
If Target.Column = 1 Then
Set Fnd = Sheets("Sheet2").Range("A:A").Find(Target.Value, , xlValues, xlWhole, , , False, , False)
If Fnd Is Nothing Then
Target.Interior.Color = xlNone
Else
Target.Interior.Color = Fnd.Interior.Color
End If
End If
End Sub
How aboutCode:Private Sub Worksheet_Change(ByVal Target As Range) Dim Fnd As Range If Target.CountLarge > 1 Then Exit Sub If Target.Column = 1 Then Set Fnd = Sheets("Sheet2").Range("A:A").Find(Target.Value, , xlValues, xlWhole, , , False, , False) If Fnd Is Nothing Then Target.Interior.Color = xlNone Else Target.Interior.Color = Fnd.Interior.Color End If End If End Sub
How aboutCode:Private Sub Worksheet_Change(ByVal Target As Range) Dim Fnd As Range If Target.CountLarge > 1 Then Exit Sub If Target.Column = 1 Then Set Fnd = Sheets("Sheet2").Range("A:A").Find(Target.Value, , xlValues, xlWhole, , , False, , False) If Fnd Is Nothing Then Target.Interior.Color = xlNone Else Target.Interior.Color = Fnd.Interior.Color End If End If End Sub