P
pierre
Guest
Ok, maintenant j´arrive a supprimer les doublons grace a:
Sub supdoublon()
Columns("A:B").Select
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("A1").Select
While ActiveCell.Offset(1, 0).Value <> ""
If ActiveCell.Offset(1, 0).Value = ActiveCell.Value Then
ActiveCell.Offset(0, 1).Value = ActiveCell.Offset(0, 1).Value + ActiveCell.Offset(1, 1).Value
ActiveCell.Offset(1, 0).Select
ActiveCell.Rows("1:1").EntireRow.Select
Selection.Delete Shift:=xlUp
ActiveCell.Offset(-1, 0).Select
Else
ActiveCell.Offset(1, 0).Select
End If
Wend
End Sub
Maintenant j´aimerais supprimer les doublons et leur original de maniere a ce qu´il ne reste que les references uniques.
Comment faire?
Merci
Sub supdoublon()
Columns("A:B").Select
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("A1").Select
While ActiveCell.Offset(1, 0).Value <> ""
If ActiveCell.Offset(1, 0).Value = ActiveCell.Value Then
ActiveCell.Offset(0, 1).Value = ActiveCell.Offset(0, 1).Value + ActiveCell.Offset(1, 1).Value
ActiveCell.Offset(1, 0).Select
ActiveCell.Rows("1:1").EntireRow.Select
Selection.Delete Shift:=xlUp
ActiveCell.Offset(-1, 0).Select
Else
ActiveCell.Offset(1, 0).Select
End If
Wend
End Sub
Maintenant j´aimerais supprimer les doublons et leur original de maniere a ce qu´il ne reste que les references uniques.
Comment faire?
Merci