Hello,
I am using the Like function, but it isn't working on all of the cells.
column B has company names. I am trying to get rid of names that have the word sample in them.
my code:
'getting rid of sample plans
For Each cell In Range("B2:B" & lastrow)
If cell Like "*Sample*" Then
cell.EntireRow.Delete
End If
Next
it gets rid of only some of the plans with the word sample. any help is greatly appreciated!
Thanks,
D
I am using the Like function, but it isn't working on all of the cells.
column B has company names. I am trying to get rid of names that have the word sample in them.
my code:
'getting rid of sample plans
For Each cell In Range("B2:B" & lastrow)
If cell Like "*Sample*" Then
cell.EntireRow.Delete
End If
Next
it gets rid of only some of the plans with the word sample. any help is greatly appreciated!
Thanks,
D