1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| Sub Test()
Dim derligne as Long
Dim Valeurs_Possibles(8) as Variant
Dim rep as Long, i As Long
Dim v As Long
Dim F As Boolean
Valeurs_Possibles(8) = Array("Arret1", "Arret2", "Arret3")
Valeurs_Possibles(5) = Array("Arret4", "Arret5", "Arret6", "Arret7")
While rep <> 8 Or rep<> 5
rep = Application.InputBox(Prompt:="Ligne ? actuellement dispo 05, 08", Type:=1)
Wend
derligne = Range("A" & Rows.Count).End(xlUp).Row
For i = derligne To 2 Step -1
F = False
For v = LBound(Valeurs_Possibles(rep), 1) To UBound(Valeurs_Possibles(rep), 1)
If Cells(i, 8) Like Valeurs_Possibles(rep, v) Then
F = True
Exit For
Next v
If Not F Then Rows(i).Delete
Next i
End Sub |
Partager