Hello, I’ve been working with this macro to compare two worksheets and copy the matches to a third sheet. Not knowing vb very well can someone show me how to modify this to only copy what is not found?
Sheet1 and Sheet2 column A is the unique id.
If no match is found between Sheet1 and Sheet2 then copy the row in Sheet1 to Sheet3
This works below to copy the matches but I’m looking for what is not found now.
Dim rng As Range, c As Range, cfind As Range
On Error Resume Next
Set rng = Range(.Range("A2"), .Range("a2").End(xlDown))
For Each c In rng
Set cfind = .Columns("A:A").Cells.Find _
If cfind Is Nothing Then GoTo line1
c.EntireRow.Copy Worksheets("sheet3").Cells(Rows.Count, "A").End(xlUp).Offset(1, 0)
End With 'sheet 2
Application.CutCopyMode = False
End With 'sheet 1
Vba code to compare two excel sheets and highlight differences
Vba code to compare two excel sheets and copy differences - Best answers