Escolar Documentos
Profissional Documentos
Cultura Documentos
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in
the 2019 Developer Survey.
For i = 1 To 99
If i <> 41 And i <> 83 And i <> 87 And i <> 91 _
And i <> 92 And i <> 93 And i <> 98 Then
'do stuff
End If
Next i
not_use = "41,83,87,91,92,93,98"
6 Answers
https://stackoverflow.com/questions/29661897/loop-through-all-numbers-in-a-range-except-a-few 2/6
4/11/2019 excel - Loop through all numbers in a range except a few - Stack Overflow
For i = 1 To 99
Select Case i
Case 41, 83, 87, 91, 92, 93, 98
'Do nothing
Case Else
'Do stuff
End Select
Next
For i = 1 To 99
If Application.Evaluate("ISERROR(
'// Do Something
End If
Next i
https://stackoverflow.com/questions/29661897/loop-through-all-numbers-in-a-range-except-a-few 4/6
4/11/2019 excel - Loop through all numbers in a range except a few - Stack Overflow
For i = 1 To 99
For x = LBound(MyArray) To UBound
If i = MyArray(x) Then
'Skip
Else
'Some code
End If
Next x
Next i
End Sub
https://stackoverflow.com/questions/29661897/loop-through-all-numbers-in-a-range-except-a-few 6/6