I am trying to not include cells which contain certain strings in my For Each Loop. I have the following:
For Each Cel In Rng
If Cel.Offset(, -5).InStr(1, Cel.Value, "Part of" Or "NOT REQUIRED" Or "Need breakdown for") Then GoTo Skip 'the -5 is trying to Offset to the left rather than right, Is this done correctly?
'LOTS of stuff
Skip:
Next Cel
I am receiving error 424 object required on the If statement. Isn't "Cel" the object? What should I change? Also, am I on the right track using the InStr() method?
Thank You!
For Each Cel In Rng
If Cel.Offset(, -5).InStr(1, Cel.Value, "Part of" Or "NOT REQUIRED" Or "Need breakdown for") Then GoTo Skip 'the -5 is trying to Offset to the left rather than right, Is this done correctly?
'LOTS of stuff
Skip:
Next Cel
I am receiving error 424 object required on the If statement. Isn't "Cel" the object? What should I change? Also, am I on the right track using the InStr() method?
Thank You!