Try
Sub test()
Dim a, i As Long, e, n As Long, dic As Object
Set dic = CreateObject("Scripting.Dictionary")
a = Sheets("update").Cells(1).CurrentRegion.Value
For i = 2 To UBound(a, 1)
dic(a(i, 4)) = Application.Index(a, i, 0)
Next
With Sheets("master").Cells(1).CurrentRegion
a = .Value
For i = 2 To UBound(a, 1)
If dic.exists(a(i, 4)) Then
If dic(a(i, 4))(1) = "" Then
dic(a(i, 1)) = Empty
a(i, 1) = "x" & a(i, 1)
End If
dic.Remove a(i, 4)
End If
Next
.Value = a
For Each e In dic
If IsArray(dic(e)) Then
n = n + 1
.Rows(.Rows.Count + n).Value = dic(e)
dic.Remove e
End If
Next
End With
If dic.Count = 0 Then Exit Sub
With Sheets("dashboard").[a2].CurrentRegion
For i = 2 To UBound(a, 1)
If dic.exists(.Cells(i, 4).Value) Then .Cells(i, 4).Value = "x" & .Cells(i, 4).Value
Next
End With
End Sub
Bookmarks