Private Sub Worksheet_Activate()
Application.ScreenUpdating = False
If FilterMode Then ShowAllData 'si la feuille est filtrée
Range("A4:B" & Rows.Count).Delete xlUp 'RAZ
Sheets("Data").[A1].CurrentRegion.AdvancedFilter xlFilterCopy, [B1:B2], [A3:B3] 'filtre avancé
'---mise en forme---
With [A1].CurrentRegion
If .Rows.Count < 4 Then Exit Sub
With .Offset(3).Resize(.Rows.Count - 3)
.Interior.ColorIndex = 6 'jaune
.Borders.Weight = xlHairline
.Borders.ColorIndex = xlAutomatic
End With
End With
With UsedRange: End With 'actualise la barre de défilement verticale
End Sub