Bonjour Amadéus, kbennani, le forum
Une solution VBA
Option Explicit
Sub Articles()
Dim a, i As Long, j As Long, txt As String, n As Long
With Sheets(1).Range("A1").CurrentRegion
a = .Value: n = 1
With CreateObject("Scripting.Dictionary")
.CompareMode = 1
For i = 2 To UBound(a, 1)
txt = a(i, 1)
If Not .exists(txt) Then
n = n + 1
.Item(txt) = n
For j = 1 To UBound(a, 2)
a(n, j) = a(i, j)
Next
Else
a(.Item(txt), 2) = a(.Item(txt), 2) + a(i, 2)
If a(.Item(txt), 3) < a(i, 3) Then
a(.Item(txt), 3) = a(i, 3)
End If
End If
Next
End With
Application.ScreenUpdating = False
With .Offset(, .Columns.Count + 1)
.CurrentRegion.Clear
.Cells(1).Resize(n, UBound(a, 2)).Value = a
With .CurrentRegion
.Font.Name = "calibri"
.Font.Size = 10
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.Borders(xlInsideVertical).Weight = xlThin
.BorderAround Weight:=xlThin
With .Rows(1)
.Font.Size = 11
.Interior.ColorIndex = 38
.BorderAround Weight:=xlThin
End With
.Columns.AutoFit
End With
End With
End With
Application.ScreenUpdating = True
End Sub
klin89