1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| Dim i As Long, LastLig As Long
Application.ScreenUpdating = False
With Sheets("Table")
LastLig = .Cells(Rows.Count, "B").End(xlUp).Row
.Columns(Columns.Count).Delete
For i = 0 To ListBox2.ListCount - 1
If ListBox2.Selected(i) Then
.Range("B1:B" & LastLig).AutoFilter field:=1, Criteria1:="=" & CDbl(Me.ListBox2.List(i))
.Range(.Cells(2, Columns.Count), .Cells(LastLig, Columns.Count)).SpecialCells(xlCellTypeVisible).Value = "F"
End If
Next i
.Range("B1").AutoFilter
.Range(.Cells(1, Columns.Count), .Cells(LastLig, Columns.Count)).AutoFilter field:=1, Criteria1:="F"
End With |
Partager