Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range, rngSubject As Range
Dim currCol As Integer, firstCol As Integer, lastCol As Integer
Dim keyWords As String
If Target.Cells.Count > 1 Then Exit Sub
If Target.Row > 3 And Target.Column > 2 Then
currCol = Target.Column
firstCol = Cells(1, currCol).MergeArea.Cells(1, 1).Column
lastCol = Cells(1, currCol).MergeArea.Columns.Count + firstCol - 1
Set rng = Range(Cells(Target.Row, firstCol), Cells(Target.Row, lastCol))
Set rngSubject = Range(Cells(3, firstCol), Cells(3, lastCol))
rng.Interior.Color = xlNone
For i = 1 To rng.Columns.Count
If rng.Cells(1, i) <> "" Then
keyWords = rng.Cells(1, i) & rngSubject.Cells(1, i)
For j = 1 To rng.Columns.Count
If i <> j Then
If keyWords = rng.Cells(1, j) & rngSubject.Cells(1, j) Then
rng.Cells(1, j).Interior.Color = RGB(255, 255, 0)
rng.Cells(1, i).Interior.Color = RGB(255, 255, 0)
End If
End If
Next
End If
Next
End If
End Sub