Sub MasqueDemasque()
Application.ScreenUpdating = False
If TypeName([Masque]) <> "Boolean" Then ThisWorkbook.Names.Add "Masque", False
ThisWorkbook.Names.Add "Masque", Not [Masque]
Columns.Hidden = False
If [Masque] Then
Rows(1).Insert
[B1:ABC1] = "=1/(B3=$ABE6)"
On Error Resume Next 'si aucune SpecialCell
[B1:ABC1].SpecialCells(xlCellTypeFormulas, 16).EntireColumn.Hidden = True
Rows(1).Delete
End If
Recherche 'pour sélectionner et cadrer
End Sub
Sub Recherche()
On Error GoTo erreur
Cells(2, Application.Match([ABE5], Rows(2), 0)).Select 'sélection
ActiveWindow.ScrollRow = 2: ActiveWindow.ScrollColumn = ActiveCell.Column 'cadrage
Exit Sub
'si date incorrecte
erreur:
MsgBox "La date " & [ABE5] & " n'est pas présente"
End Sub