Bonjour Mria et
Sub encadrer_Contour()
Dim Titre1 As Range
Dim Titre2 As Range
Set Titre1 = Columns(1).Find("Nouvelles anomalies", , xlValues, xlWhole)
Set Titre2 = Columns(1).Find("Anomalies supprimées", , xlValues, xlWhole)
If Not Titre1 Is Nothing And Not Titre2 Is Nothing Then
Contour Range(Cells(Titre1.Row, 1), Cells(Titre1.Row, 9))
Contour Range(Cells(Titre2.Row, 1), Cells(Titre2.Row, 9))
If Titre1.Offset(1, 0) <> "" Then _
Contour Range(Cells(Titre1.Offset(1, 0).Row, 1), Cells(Titre1.End(xlDown).Row, 9))
If Titre2.Offset(1, 0) <> "" Then _
Contour Range(Cells(Titre2.Offset(1, 0).Row, 1), Cells(Titre2.End(xlDown).Row, 9))
End If
End Sub
Sub Contour(Plage)
Plage.BorderAround xlContinuous, xlMedium, xlColorIndexAutomatic
End Sub
A+