Is there a way of going to the next increment in a for each loop in the middle if a condition is met.
In the below code where I have "GoTo Next:" I want it to move on to the next loop.
In the below code where I have "GoTo Next:" I want it to move on to the next loop.
Code:
For Each Handler In Range("Handlers")
If Not Handler = vbNullString Then
Set FoundRange = SearchRange.Find(Handler.Text)
If FoundRange Is Nothing Then
MsgBox (Handler.Text & "Is Missing")
Exit Sub
End If
If Not Left(FoundRange.Offset(5, 0).Text, 6) = " daily" Then
Sheets("Data").Range("H2").Value = Sheets("Data").Range("H2").Value + FoundRange.Offset(4, 11)
Else
GoTo Next:
End If
If Not Left(FoundRange.Offset(6, 0).Text, 6) = " daily" Then
Sheets("Data").Range("H3").Value = Sheets("Data").Range("H3").Value + FoundRange.Offset(5, 11)
Else
GoTo Next:
End If
Next Handler