Sub test()
Dim i, ii As Long
For i = 1 To Sheets("Sheet1").Range("a" & Rows.Count).End(xlUp).Row
With Sheets("Sheet2").Columns("a")
Set c = .Find(Cells(i, "a").Value, LookIn:=xlValues)
If Not c Is Nothing Then
ff = c.Address
Do
If c.Offset(, 1) = Cells(i, "b") _
And c.Offset(, 4) <> Cells(i, "e") Then
Sheets("Sheet1").Cells(i, "e").Interior.ColorIndex = 6
c.Offset(, 4).Interior.ColorIndex = 6
End If
Set c = .FindNext(c)
Loop Until ff = c.Address
Else
Sheets("Sheet1").Cells(i, "a").Resize(, 2).Interior.ColorIndex = 4
End If
End With
Cells(i, "aa") = Cells(i, "a") & Cells(i, "b")
For ii = 1 To Sheets("Sheet2").Range("a" & Rows.Count).End(xlUp).Row
Sheets("Sheet2").Cells(ii, "aa") = Sheets("Sheet2").Cells(ii, "a") & Sheets("Sheet2").Cells(ii, "b")
Next
Next
For i = 1 To Sheets("Sheet1").Range("a" & Rows.Count).End(xlUp).Row
With Sheets("Sheet2").Columns("aa")
Set fc = .Find(Cells(i, "aa").Value, , , xlWhole)
If fc Is Nothing Then
Sheets("Sheet1").Cells(i, "a").Resize(, 2).Interior.ColorIndex = 4
End If
End With
Next
'highlight sheet2
For i = 1 To Sheets("Sheet2").Range("a" & Rows.Count).End(xlUp).Row
With Sheets("Sheet1").Columns("aa")
Set fc = .Find(Sheets("Sheet2").Cells(i, "aa").Value, , , xlWhole)
If fc Is Nothing Then
Sheets("Sheet2").Cells(i, "a").Resize(, 2).Interior.ColorIndex = 4
End If
End With
Next
Sheets("Sheet1").Columns("aa").ClearContents
Sheets("Sheet2").Columns("aa").ClearContents
End Sub