Private Sub Worksheet_Change(ByVal Target As Range)
Dim s, cel As Range
If Intersect(Target, [A1]) Is Nothing Then Exit Sub
Application.ScreenUpdating = False
If [A1] = "" Or [A1] = "Tout" Then
Columns.Hidden = False
Else
Columns("E:S").Hidden = True 'colonnes A:D non masquées
For Each s In Split([A1], " / ")
For Each cel In [E3:S3]
If cel = s Then cel.EntireColumn.Hidden = False
Next
Next
End If
'---Bordures---
Application.DisplayAlerts = False
For Each s In Array("E2:G2", "H2:M2", "N2:S2")
With Range(s)
.Merge
.UnMerge
.Value = .Cells(1)
With .SpecialCells(xlCellTypeVisible)
With Range(.Areas(1), .Areas(.Areas.Count))
.Merge
.Borders(xlEdgeLeft).Weight = xlThin
.Borders(xlEdgeRight).Weight = xlThin
End With
End With
End With
Next
End Sub