I am trying to look at ways to if a statement is true, go to next for statement instead of carrying on code.
The issue is kicking off on If comment_Or_coupon Then goto Next rowHeader
, because I can't go to the next rowHeader
.
Sub UniqueFetchDBTabletest()
Dim tempList As Variant
Dim rowHeader As Variant
Dim comment_Or_coupon As Boolean
tempList = [RangeofIDCells]
For Each rowHeader In tempList:
comment_Or_coupon = False
If InStr(1, LCase(rowHeader), "comment", vbTextCompare) = 0 Then comment_Or_coupon = True
If InStr(1, LCase(rowHeader), "coupon", vbTextCompare) = 0 Then comment_Or_coupon = True
If comment_Or_coupon Then goto Next rowHeader
' else I want to continue doing code
Next rowHeader
End Sub