Reputation: 447
I have a simple if statement using the In String function referencing a collection and cell within my worksheet.
If Not InStr(1, MyPeople(n).DivisionOwner, cel.Offset(0, 12).Value, 1) Then
cel.EntireRow.Hidden = True
End If
The problem is that I know for a fact that i am referencing the correct cell and collection cell. I even tested it with a simple MsgBox(MyPeople(n).DivisionOwner)
This means the problem must be in my statement, but it's simply not working!
Upvotes: 0
Views: 303
Reputation: 33682
Try :
If InStr(1, MyPeople(n).DivisionOwner, cel.Offset(0, 12).Value, 1) = 0 Then
Assuming cel
is defined as Range
.
Upvotes: 1