Bonsoir anto75, Steelson
Vois ceci :
Option Explicit
Sub test()
Dim a, b(), i As Long, n As Long, txt As String
a = Sheets("Feuil1").Range("a1").CurrentRegion.Value
ReDim b(1 To UBound(a, 1), 1 To UBound(a, 2))
With CreateObject("Scripting.Dictionary")
.comparemode = 1
For i = 2 To UBound(a, 1)
txt = Join$(Array(a(i, 1), a(i, 2), a(i, 3)), Chr(2))
If Not .exists(txt) Then
n = n + 1
b(n, 1) = a(i, 1)
b(n, 2) = a(i, 2)
b(n, 3) = a(i, 3)
.Item(txt) = n
End If
b(.Item(txt), 4) = b(.Item(txt), 4) & _
IIf(b(.Item(txt), 4) <> "", "|", "") & a(i, 4)
Next
End With
Application.ScreenUpdating = False
On Error Resume Next
Application.DisplayAlerts = False
Sheets("resultat").Delete
Sheets.Add().Name = "Resultat"
On Error GoTo 0
With Sheets("resultat").Cells(1)
.Resize(, UBound(a, 2)).Value = a
With .Offset(1).Resize(n, UBound(b, 2))
.Value = b
End With
With .CurrentRegion
.Font.Name = "calibri"
.BorderAround Weight:=xlThin
.Borders(xlInsideVertical).Weight = xlThin
.VerticalAlignment = xlCenter
With .Columns("a:c")
.HorizontalAlignment = xlCenter
.ColumnWidth = 19
End With
With .Rows(1)
.Font.Size = 11
.BorderAround Weight:=xlThin
.Interior.ColorIndex = 36
End With
End With
End With
Application.ScreenUpdating = True
End Sub
klin89