Bonsoir le forum,
joaquim, c'est sympa une chtite macro
Sub transpose()
Dim a, b(), i As Long, j As Long, n As Long
Application.ScreenUpdating = True
With Sheets(1).Range("a1").CurrentRegion
a = .Value
ReDim b(1 To .Cells.Count, 1 To 4)
End With
n = 1: b(1, 1) = a(1, 1): b(1, 2) = a(1, 2)
For i = 2 To UBound(a, 1)
For j = 3 To UBound(a, 2)
n = n + 1
b(n, 1) = a(i, 1)
b(n, 2) = a(i, 2)
b(n, 3) = a(1, j)
b(n, 4) = a(i, j)
Next
Next
With Sheets(2).Cells(1).Resize(n, UBound(b, 2))
.CurrentRegion.Clear
.Value = b
With .CurrentRegion
.Font.Name = "calibri"
.Font.Size = 10
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.Borders(xlInsideVertical).Weight = xlThin
.BorderAround Weight:=xlThin
With .Rows(1)
.Font.Size = 11
.Interior.ColorIndex = 43
.BorderAround Weight:=xlThin
End With
.Columns.AutoFit
End With
End With
Application.ScreenUpdating = True
End Sub
klin89