Sub tomau()
Dim dl(), i As Long, j As Long, d1 As Object, d2 As Object, tam(), dk As String, x As Byte
Set d1 = CreateObject("scripting.dictionary")
Set d2 = CreateObject("scripting.dictionary")
Sheet1.[D5:K1000].Interior.ColorIndex = xlNone
dl = Sheet1.Range(Sheet1.[D5], Sheet1.[D65536].End(3)).Resize(, 8).Value
For i = 1 To UBound(dl, 2) Step 3
For j = 1 To UBound(dl)
dk = dl(j, i) & dl(j, i + 1)
If dk <> "" Then
If Not d1.exists(dk) Then
d1.Add dk, ""
Else
If Not d2.exists(dk) Then d2.Add dk, ""
End If
End If
Next
Next
tam = d2.keys
For x = 0 To UBound(tam)
For i = 1 To UBound(dl, 2) Step 3
For j = 1 To UBound(dl)
dk = dl(j, i) & dl(j, i + 1)
If dk = tam(x) Then
Cells(j + 4, i + 3).Interior.ColorIndex = 3
Cells(j + 4, i + 4).Interior.ColorIndex = 3
End If
Next
Next
Next
End Sub