Bonsoir Supermoquette, h2so4, gmb, le forum
En supposant que les cellules en tëte de ligne (et seulement celles-ci) soient toujours sous le format suivant : Verdana et taille 12
Dans un module standard :
Sub Transpose()
Dim Rng As Areas, i As Long
Application.ScreenUpdating = False
With Range("a1", Range("a" & Rows.Count).End(xlUp)).Offset(, 1)
.Formula = "=if(Leformat(a1),1,"""")"
.Value = .Value
On Error Resume Next
.SpecialCells(2, 1).EntireRow.Insert
.EntireColumn.Delete
End With
Set Rng = Columns(1).SpecialCells(2).Areas
On Error GoTo 0
If Rng Is Nothing Then Exit Sub
For i = 1 To Rng.Count
Rng(i).Copy
Cells(i, 3).PasteSpecial Transpose:=True
Next
Columns.AutoFit
Columns("A:B").Delete
Application.ScreenUpdating = True
End Sub
Function Leformat(r As Range) As Boolean
Leformat = r.Font.Name = "Verdana" And r.Font.Size = 12
End Function
klin89