Bonsoir,
Regarde le fichier joint.
J'ai pris en compte le fait que les couleurs soient en "Nom Propre", minuscule ou majuscule.
Le Code :
Sub total()
Dim Cel As Range, Plg As Range
Dim LeRang As Object
Set LeRang = CreateObject("Scripting.Dictionary")
Set Plg = Range("B7:B" & Cells(Rows.Count, 2).End(xlUp).Row)
For Each Cel In Plg
LeRang(Application.Proper(Cel.Value) & ";" & Application.Proper(Cel.Offset(, 1).Value)) = _
LeRang(Application.Proper(Cel.Value) & ";" & Application.Proper(Cel.Offset(, 1).Value)) + Cel.Offset(, 2).Value
Next Cel
Range("J7:L1000").ClearContents
With Range("J7").Resize(LeRang.Count)
.Value = Application.Transpose(LeRang.Keys)
.Offset(, 2) = Application.Transpose(LeRang.Items)
.TextToColumns Destination:=Range("J7"), DataType:=xlDelimited, Semicolon:=True
End With
End Sub
Le fichier :
Bon courage