Option Explicit
Option Compare Text
Sub ertert()
Dim x, i&: Application.ScreenUpdating = False
With Sheets("Incident Management")
x = .Range("E1:G" & .Cells(Rows.Count, 5).End(xlUp).Row).Value
End With
With CreateObject("Scripting.Dictionary")
.CompareMode = 1
For i = 2 To UBound(x)
.Item(x(i, 1)) = x(i, 3)
Next i
With Sheets("Open Incidents")
With .Range("D1:G" & .Cells(Rows.Count, 4).End(xlUp).Row)
x = .Value
.Columns(4).Offset(1).Interior.Color = xlNone
End With
.Activate
End With
For i = 2 To UBound(x)
If .Exists(x(i, 1)) Then
If .Item(x(i, 1)) <> x(i, 4) Then Cells(i, 7).Interior.ColorIndex = 45
End If
Next i
End With
Application.ScreenUpdating = True
End Sub
|