This code do exactly what I need but I can't figure it out how to adapt it to my needs...
Please can you tell me how can I change this to work instead searching from A1:C and coping missing data to D1:F to work only comparing two columns J1:J and K1:K
Attach: https://www.4shared.com/s/fI0i45Uxyda
Please can you tell me how can I change this to work instead searching from A1:C and coping missing data to D1:F to work only comparing two columns J1:J and K1:K
Attach: https://www.4shared.com/s/fI0i45Uxyda
Code:
Option Explicit
Sub test()
Dim a, i As Long, ii As Long, x As Range
With Range("a1").CurrentRegion
a = .Value: ReDim b(1 To UBound(a, 1) * 2, 1 To 3)
With CreateObject("Scripting.Dictionary")
.CompareMode = 1
For i = 1 To UBound(a, 1)
If a(i, 4) <> "" Then .Item(a(i, 4)) = Empty
Next
For i = 1 To UBound(a, 1)
If Not .exists(a(i, 1)) Then
If x Is Nothing Then
Set x = Cells(i, 1).Resize(, 3)
Else
Set x = Union(x, Cells(i, 1).Resize(, 3))
End If
End If
Next
End With
If Not x Is Nothing Then
x.Copy Cells(Rows.Count, 4).End(xlUp)(2)
Set x = Nothing
Else
MsgBox "No new item"
End If
End With
End Sub