Option Compare Text
Sub Masquer()
Dim Scope()
Scope = Array("stock initial", "entrees", "sorties", "stock", "mini", "état de stock")
nrows = ActiveSheet.UsedRange.Rows.Count
For Each Column In Columns
If IsInArray(Column.Cells(1), Scope) Then
If WorksheetFunction.CountA(Column.Cells(3).Resize(nrows - 2)) = 0 Then Column.Hidden = True
End If
Next
End Sub
Function IsInArray(Objet As String, Crit())
IsInArray = True
For Each Elem In Crit
If Trim(Objet) = Elem Then Exit Function
Next
IsInArray = False
End Function
Sub Afficher_tout()
Sheets("stock").Columns.Hidden = False
End Sub