Try this code.
Public Sub CompareData()
Dim iRow As Integer
ActiveSheet.Range("A1").Select
Do Until ActiveCell.Value = ""
iRow = ActiveCell.Row
If Not ActiveSheet.Range("A" & iRow).Value = ActiveSheet.Range("B" & iRow).Value Then
Range("B" & iRow & ":C" & iRow).Select
Selection.Insert Shift:=xlDown
ActiveSheet.Range("A" & iRow + 1).Select
Else
ActiveSheet.Range("A" & iRow + 1).Select
End If
Loop
End Sub
ASSUMES: your data starts in cell A1, if not change "ActiveSheet.Range("A1").Select"
ASSUMES: no breaks in data in Column A, and the code will stop once the first empty cell in Column A is found.
HTH
Art
Bookmarks