Sub test()
Dim copier As Boolean, doublon As Boolean
Dim liste As New Collection
For ligneG = Range("a65536").End(xlUp).Row To 1 Step -1
On Error Resume Next
liste.Add Cells(ligneG, 1), CStr(Cells(ligneG, 1))
If Err.Number <> 0 Then
Cells(ligneG, 1).Delete
GoTo suite
End If
On Error GoTo 0
doublon = False
copier = False
For ligneD = Range("b65536").End(xlUp).Row To 1 Step -1
If Cells(ligneD, 2) = Cells(ligneG, 1) Then
doublon = True
If copier = False Then
Sheets(2).Range("a65536").End(xlUp).Offset(1, 0) = Cells(ligneD, 2)
copier = True
End If
Cells(ligneD, 2).Delete
End If
Next
If doublon = True Then
Cells(ligneG, 1).Delete
End If
suite:
Next
End Sub