hi,
i have code with 'for' loop 6-138
i want the loop to ignore 10 numbers.
i know that i can write if not statement to ignore one number.
how can i ignore 10 numbers in one if statement?
i attach part of the code to explain my question.
the code runs on column with loop on the cells
[pre]
[/pre]
i want to fix this code and to use one if statement
can it be?
thanks
asaf
i have code with 'for' loop 6-138
i want the loop to ignore 10 numbers.
i know that i can write if not statement to ignore one number.
how can i ignore 10 numbers in one if statement?
i attach part of the code to explain my question.
the code runs on column with loop on the cells
[pre]
Code:
Sub expances_sheet2()
Dim i As Integer
On Error Resume Next
For i = 6 To 138
If Not i = 30 Then
If Not i = 36 Then
If Not i = 45 Then
If Not i = 50 Then
If Not i = 54 Then
If Not i = 63 Then
If Not i = 69 Then
If Not i = 91 Then
If Not i = 94 Then
If Not i = 133 Then
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next i
i want to fix this code and to use one if statement
can it be?
thanks
asaf