Bonjour
Une proposition en attendant mieux (la double boucle n'est pas trop de mon goût ) :
Sub test()
Dim i&, DRw As Object, DCol As Object
Dim TData As Variant, TReport As Variant
Set DRw = CreateObject("scripting.dictionary")
Set DCol = CreateObject("scripting.dictionary")
With Sheets("Page1_1") 'nom a adapter
TData = .Range(.Cells(1, 1), .Cells(.Rows.Count, 1).End(3)(1, 3))
End With
For i = LBound(TData, 1) + 1 To UBound(TData, 1)
If Not DRw.Exists(TData(i, 2)) Then DRw(TData(i, 2)) = DRw.Count + 1
If Not DCol.Exists(TData(i, 1)) Then DCol(TData(i, 1)) = DCol.Count + 1
Next i
ReDim TReport(1 To DRw.Count + 1, 1 To DCol.Count + 1)
TReport(1, 1) = TData(1, 2)
For i = LBound(TData, 1) + 1 To UBound(TData, 1)
TReport(DRw(TData(i, 2)) + 1, 1) = TData(i, 2)
TReport(1, DCol(TData(i, 1)) + 1) = TData(i, 1)
TReport(DRw(TData(i, 2)) + 1, DCol(TData(i, 1)) + 1) = TData(i, 3)
Next i
With Sheets("Feuil1") 'nom a adapter
.Cells(1, 1).Resize(UBound(TReport, 1), UBound(TReport, 2)) = TReport
.Columns.AutoFit
End With
End Sub
Cordialement
Avec le fichier exemple.