Bonsoir le fil,
Vois ceci :
Restitution en Feuil1
Option Explicit
Sub test()
Dim a, b(), i As Long, n As Long, t As Long, dico As Object
Set dico = CreateObject("Scripting.Dictionary")
dico.CompareMode = 1
a = Sheets("Données").Range("a1").CurrentRegion.Value
ReDim b(1 To UBound(a, 1), 1 To UBound(a, 1))
n = 1: t = 1
With CreateObject("Scripting.Dictionary")
.CompareMode = 1
For i = 2 To UBound(a, 1)
If Not dico.exists(a(i, 7)) Then
n = n + 1: dico(a(i, 7)) = n
b(n, 1) = a(i, 7)
End If
If Not .exists(a(i, 6)) Then
t = t + 1: .Item(a(i, 6)) = t
b(1, t) = a(i, 6)
End If
b(dico(a(i, 7)), .Item(a(i, 6))) = a(i, 5)
Next
End With
Application.ScreenUpdating = False
'restitution et mise en forme
With Sheets("Feuil1")
.Cells.Clear
With .Cells(1).Resize(n, t)
.Value = b
.Font.Name = "calibri"
.Font.Size = 10
.VerticalAlignment = xlCenter
.BorderAround Weight:=xlThin
.Borders(xlInsideVertical).Weight = xlThin
With .Rows(1)
.BorderAround Weight:=xlThin
.HorizontalAlignment = xlCenter
With .Offset(, 1).Resize(, .Columns.Count - 1)
.Interior.ColorIndex = 36
.Font.Bold = True
End With
End With
With .Columns(1)
.HorizontalAlignment = xlCenter
With .Offset(1).Resize(.Rows.Count - 1)
.Interior.ColorIndex = 38
End With
End With
.Columns.ColumnWidth = 12
End With
.Activate
End With
Application.ScreenUpdating = True
End Sub
klin89