Re : Doublons sur plusieurs colonnes
Bonjour, une autre solution, sans utiliser les TCD, par la fonction Données/consolider :
le code :
Sub consoli()
Dim cel As Range, MonDico, temp, I, Plg1 As Range, Plg2 As Range
Dim plage1, plage2
Set Plg1 = Range("A2:A" & Range("A65536").End(xlUp).Row)
Plg1.Name = "plage1"
Set Plg2 = Range("C2:C" & Range("C65536").End(xlUp).Row)
Plg2.Name = "plage2"
Set MonDico = CreateObject("Scripting.Dictionary")
For Each cel In Range("plage1")
If Not MonDico.Exists(cel.Value) Then MonDico.Add cel.Value, cel.Value
Next cel
For Each cel In Range("plage2")
If Not MonDico.Exists(cel.Value) Then MonDico.Add cel.Value, cel.Value
Next cel
temp = MonDico.items
For I = LBound(temp) To UBound(temp): Cells(1 + I, 6) = temp(I): Next
Range("F1:F" & Range("F65000").End(xlUp).Row).Select
Set Plg1 = Range("A2:B" & Range("A65536").End(xlUp).Row)
Plg1.Name = "plage1"
Set Plg2 = Range("C2
" & Range("C65536").End(xlUp).Row)
Plg2.Name = "plage2"
Selection.Consolidate Sources:=Array("plage1", "plage2"), Function:=xlSum, TopRow:=True, LeftColumn:=True
Range("F2").Select
End Sub