Hello C4rn3v1l,
To check for differences in two sheets, we may have to change tack a little and reference one sheet from the other and vice versa. So try the following code ( untested ):-
Sub CompareSheets2()
Application.ScreenUpdating = False
Dim lr As Long
Dim lCol As Long
Dim i As Integer
lr = Sheet1.Range("A" & Rows.Count).End(xlUp).Row
lCol = Sheet1.Cells(2, Columns.Count).End(xlToLeft).Column
Sheet1.Select
For i = 2 To lr
If Sheet2.Cells(i, 1).Value <> Sheet1.Cells(i, 1).Value Then
Sheet1.Range(Cells(i, 1), Cells(i, lCol)).Copy Sheet3.Range("A" & Rows.Count).End(3)(2)
End If
Next
Sheet2.Select
For i = 2 To lr
If Sheet1.Cells(i, 1).Value <> Sheet2.Cells(i, 1).Value Then
Sheet2.Range(Cells(i, 1), Cells(i, lCol)).Copy Sheet3.Range("A" & Rows.Count).End(3)(2)
End If
Next
Sheet3.Select
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
Again, the code assumes that you are looking for differences in Column A only. If you need to check for differences over entire rows, then let me know.
I hope that this helps.
Cheerio,
vcoolio.
Cheerio,
vcoolio.
"Sheet1.Range(Cells(cell.Row, "A"), Cells(cell.Row, "F")).Copy Sheet3.Range("A" & Rows.Count).End(3)(2)" is where im getting the error