Bonjour,
Sub Encadrer()
Dim i%, j%
Application.ScreenUpdating = False
With Worksheets("Feuil1")
i = 2: j = 2
Do While .Cells(i, 1) <> ""
j = j + 1
If .Cells(j, 1) <> .Cells(i, 1) Then
.Rows(j).Insert
.Range(.Cells(i, 1), .Cells(j - 1, 3)).BorderAround xlContinuous, xlMedium
i = j + 1: j = i
End If
Loop
.Range(.Cells(2, 1), .Cells(i - 2, 3)).BorderAround xlContinuous, xlMedium
End With
End Sub
Cordialement.