Sub Masquer()
Dim F As Worksheet, P As Range, tablo, ncol%, i&, n&, j%
Set F = Feuil1 'CodeName
Set P = F.[B4].CurrentRegion
If Application.CountIf(P.Columns(2), 0) = 0 Then Exit Sub
Application.ScreenUpdating = False
Application.DisplayAlerts = False
On Error Resume Next 'si la feuille Memo n'existe pas
Sheets("Memo").Delete
With Sheets.Add(After:=F) 'crée la feuille
.Name = "Memo"
P.Copy .[A1]
.Visible = xlSheetHidden 'xlSheetVeryHidden 'masque la feuille
End With
tablo = P.FormulaR1C1 'matrice, plus rapide
ncol = UBound(tablo, 2)
For i = 1 To UBound(tablo)
If tablo(i, 2) <> "0" Then
n = n + 1
For j = 1 To ncol
tablo(n, j) = tablo(i, j)
Next j
End If
Next i
P.Resize(n) = tablo
P(1).Offset(n).Resize(F.Rows.Count - n - P.Row + 1, ncol).Delete xlUp 'RAZ en dessous
P.Borders(xlEdgeBottom).Weight = xlMedium 'bordure inférieure
End Sub
Sub Afficher()
On Error Resume Next
Sheets("Memo").[A1].CurrentRegion.Copy Feuil1.[B4] 'restitue le tableau d'origine
End Sub