Sub Comparer()
Dim nLig1 As Long, nLig2 As Long, i As Long
Application.ScreenUpdating = False
'effacement colonne E
Columns("e").ClearContents
'tri colonne A et B
nLig1 = Cells(Rows.Count, "a").End(xlUp).Row
Range(Cells(2, "a"), Cells(nLig1, "b")).Sort key1:=Columns("a"), Header:=xlNo
'tri colonne C et D
nLig2 = Cells(Rows.Count, "c").End(xlUp).Row
Range(Cells(2, "c"), Cells(nLig2, "d")).Sort key1:=Columns("c"), Header:=xlNo
'comparaison colonne A et B
i = 2
Do While Cells(i, "a") <> "" And Cells(i, "c") <> ""
If Cells(i, "a") < Cells(i, "c") Then
Cells(i, "c").Resize(, 2).Insert xlShiftDown
ElseIf Cells(i, "a") > Cells(i, "c") Then
Cells(i, "a").Resize(, 2).Insert xlShiftDown
End If
i = i + 1
Loop
'Marquage différence ou non
nLig1 = Cells(Rows.Count, "a").End(xlUp).Row
nLig2 = Cells(Rows.Count, "c").End(xlUp).Row
If nLig2 > nLig1 Then nLig1 = nLig2
For i = 2 To nLig1
If Cells(i, "b") <> Cells(i, "d") Then Cells(i, "e") = "diff"
Next i
Application.ScreenUpdating = True
End Sub