I need to loop through i = 1 to 99 but I want to skip a few specific i values. the numbers I want to skip are 41,83,87,91,92,93,98
I realize I could nest all my actions inside an i <> 41
, or i <> 83
etc.
Isn't there an easier way? Maybe assign a variable to contain values to skip in a CSL
and use Split
? I don't know my brain isn't working. Please help.
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
Would prefer to set up a variable like:
not_use = "41,83,87,91,92,93,98"
then have some sort of For i = 1 To 99
unless in not_use
but there is no way to write that as far as I know.