Sub CompareCols()
Application.ScreenUpdating = False
Dim LastRow As Long
LastRow = Sheets("Sheet1").Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
Dim rngUniques As Range
Dim rng As Range, ID As Range
Sheets("Sheet1").Range("A1:A" & LastRow).AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:=Range("A1:A" & LastRow), Unique:=True
Set rngUniques = Sheets("Sheet1").Range("A2:A" & LastRow).SpecialCells(xlCellTypeVisible)
If Sheets("Sheet1").FilterMode Then Sheets("Sheet1").ShowAllData
For Each ID In rngUniques
Sheets("Sheet1").Range("A1:A" & LastRow).AutoFilter Field:=1, Criteria1:=ID
For Each rng In Range("B2:B" & LastRow).SpecialCells(xlCellTypeVisible)
If Rows(rng.Row + 1).Hidden = False Then
If rng <> rng.Offset(1, 0) Then
Range("A2:B" & LastRow).SpecialCells(xlCellTypeVisible).Interior.ColorIndex = 3
Exit For
End If
End If
Next rng
Next ID
If Sheets("Sheet1").FilterMode Then Sheets("Sheet1").ShowAllData
Application.ScreenUpdating = True
End Sub