Bonsoir à tous,
Il est déjà parti
Avec la méthode .SpecialCells
Sub bordures()
Dim myArea As Range
With Sheets("Feuil1").Range("a1").CurrentRegion
.Borders.LineStyle = xlNone
With .Columns(.Columns.Count + 1)
.Offset(1).Formula = _
"=if(rc1<>r[-1]c1,if(r[-1]c=1,""a"",1),"""")"
.Value = .Value
On Error Resume Next
.SpecialCells(2, 1).EntireRow.Insert
.SpecialCells(2, 2).EntireRow.Insert
On Error GoTo 0
.EntireColumn.Delete
End With
For Each myArea In .Columns(1).SpecialCells(2).Areas
myArea.CurrentRegion.BorderAround Weight:=2
Next
.Columns(1).SpecialCells(4).EntireRow.Delete
End With
End Sub
klin89