1 2 3 4 5 6 7 8 9 10 11 12 13 14
| Sub filtreetsupprimer()
Dim F1 As Worksheet
Set F1 = Sheets("Feuil1") ' à adapter si nécessaire
Dim I As Long
Application.ScreenUpdating = False
With F1
.Activate
I = .Cells(Rows.Count, 1).End(xlUp).Row 'suppose que la colonne A est toujours remplie si non à adapter
.Range("A1:AF" & I).AutoFilter Field:=32, Criteria1:="<>1" 'filtrer différent de 1
.Range("A2:AF" & I).SpecialCells(xlCellTypeVisible).EntireRow.Delete 'supprimer les lignes visible
.ShowAllData 'annuler filtre
End With
Application.ScreenUpdating = True
End Sub |