Sub Tab1toTab2()
Dim tabInit() As Variant
Dim tabFinal() As Variant
With Sheets("Data")
NbLignes = .Range("A" & .Rows.Count).End(xlUp).Row 'nb de lignes du tableau initial
NbCol = .Range("A1").End(xlToRight).Column 'nb de colonnes
tabInit = .Range("A1").Resize(NbLignes, NbCol).Value
taille = (UBound(tabInit, 1) - 1) * (UBound(tabInit, 2) - 1) 'calcul du nombre de lignes du tableau final
ReDim tabFinal(1 To taille, 1 To 3)
j = 1
For i = 2 To UBound(tabInit, 1)
For k = LBound(tabInit, 2) + 1 To UBound(tabInit, 2)
tabFinal(j, 1) = tabInit(i, 1)
tabFinal(j, 2) = tabInit(1, k)
tabFinal(j, 3) = tabInit(i, k)
j = j + 1
Next k
Next i
End With
With Sheets(tabInit(1, 1)) 'dans la feuille dont le nom est en cellule A1 (première cellule du tabInit)
.UsedRange.Offset(1, 0).Clear
.Range("A2").Resize(UBound(tabFinal, 1), UBound(tabFinal, 2)) = tabFinal
End With
End Sub