I need the VBA code to look through the data in my worksheets (contained in a workbook) and compare the data and match them where there are mis-matches between similar data contained in the worksheets.
VBA Code:
Sub CompareSheets()
Dim rngCell As Range
For Each rngCell In Worksheets("SheetName1").UsedRange
If Not rngCell = Worksheets("SheetName2").Cells(rngCell.Row, rngCell.Column) Then
rngCell.Interior.Color = vbYellow
End If
Next rngCell
End Sub