Bonjour,
proposition de solution via une macro
Sub test()
i = 1
l = 0
k = 1
While Cells(1, i) <> ""
If i = 1 Then
k = k + 1
Cells(3, k) = Cells(1, i)
ElseIf Cells(1, i) <> Cells(1, i - 1) Then
k = k + 1
Cells(3, k) = Cells(1, i)
End If
If l <> 0 Then
Set re = Range(Cells(4, 1), Cells(l, 1)).Find(Cells(2, i), lookat:=xlWhole)
If Not re Is Nothing Then
Cells(re.Row, k) = Cells(re.Row, k) + 1
Else
l = l + 1
Cells(l, 1) = Cells(2, i)
Cells(l, k) = 1
End If
Else
l = 4
Cells(l, 1) = Cells(2, i)
Cells(l, k) = 1
End If
i = i + 1
Wend
End Sub