[COLOR="DarkSlateGray"][B]Sub tableau_inverse()
Dim oDat, fDat, sDat, l As Long, c As Long, i As Long, j As Long, k As Long
Dim nomCh, formCh, cel As Range
nomCh = Array("cp", "N° rue", "nombre 1", "nombre 2", "total 1", "total 2")
formCh = Array("00000", "0#", "# ##0.00", "# ##0.00", "# ##0.00", "# ##0.00")
oDat = WorksheetFunction.Transpose(Sheets("Feuil1").[A6:H11].Value)
Set fDat = Sheets("Feuil1").[A6:H11]
l = UBound(oDat, 1)
c = l * (UBound(oDat, 2) - 1)
ReDim sDat(1 To 2, 1 To c)
For i = 0 To UBound(oDat, 2) - 2
For j = 1 To l
If IsEmpty(oDat(j, i + 2)) Then
k = k + 1
Else
sDat(1, j - k + i * l) = oDat(j, 1)
sDat(2, j - k + i * l) = oDat(j, i + 2)
If IsNumeric(sDat(2, j - k + i * l)) Then sDat(2, j - k + i * l) = Round(sDat(2, j - k + i * l), 0)
End If
Next j
Next i
ReDim Preserve sDat(1 To 2, 1 To c - k)
Application.ScreenUpdating = False
With Sheets("Feuil2")
.Activate
With .[A1]
.CurrentRegion.ClearContents
With .Resize(c - k, 2)
.Value = WorksheetFunction.Transpose(sDat)
k = UBound(nomCh)
For Each cel In .Columns(1).Cells
For i = 0 To k
If cel.Value2 = nomCh(i) Then Exit For
Next i
If i <= k Then cel.Offset(0, 1).NumberFormat = formCh(i)
Next cel
End With
End With
End With
Application.ScreenUpdating = True
End Sub[/B][/COLOR]