I'm using a current code to paste differences results it works perfect, but it only paste single column of non matches ...But, I need it to paste entire row. In reality Id like it to compare two columns G & H separately if possible, in both sheets, right now, ive just added the two together in a helper column..
Code:
Sub FindDifferences()
Dim i As Long, ii As Long, sq1 As Variant, sq2 As Variant, m As Long
sq1 = Sheet2.Cells(1).CurrentRegion.Columns(1)
sq2 = Sheet14.Cells(1).CurrentRegion.Columns(1)
Sheet3.Columns(1).ClearContents
For i = 1 To UBound(sq1)
ii = 0
On Error Resume Next
ii = Application.Match(sq1(i, 1), sq2, 0)
On Error GoTo 0
If ii = 0 Then
m = m + 1
Sheet3.Cells(m, 1).Value = sq1(i, 1)
End If
Next
For i = 1 To UBound(sq2)
ii = 0
On Error Resume Next
ii = Application.Match(sq2(i, 1), sq1, 0)
On Error GoTo 0
If ii = 0 Then
m = m + 1
Sheet3.Cells(m, 1).Value = sq2(i, 1)
End If
Next
End Sub
Last edited: