Sub Essai_Bordures()
Dim lig&, i&, j&, col
col = Array("B", "C", "H", "N", "T")
lig = Cells(Rows.Count, "R").End(3)(3).Row
Range("A9").Resize(lig - 8, 20).Borders.Value = 1
For i = lig To 9 Step -1
If Len(Cells(i, 1)) Then
Cells(i, 1).Resize(, 20).Borders(xlEdgeTop).Weight = xlMedium
End If
Next
For j = LBound(col) To UBound(col)
Cells(9, col(j)).Resize(lig - 8).Borders(xlEdgeLeft).Weight = xlMedium
Next
Cells(lig, 1).Resize(, 20).Borders(xlEdgeBottom).Weight = xlMedium
End Sub