View Single Post
  #6   Report Post  
Wildman
 
Posts: n/a
Default

so what your saying is....
give my column a range name="test"

and say I'm searching for the word "Wildman"
then in my macro add...

If test.Value like "*"&"wildman"&"*" then
else
exit sub
End If





Thanks again
Wildman

On 5 May 2005 10:40:08 -0700, "Harlan Grove" wrote:

Bob Phillips wrote...
For Each cell In Range(A2:A30000")
iPos = Instr(1,cell.Value,"the_word")
If iPos 0 Then
'continue code
End If
Next cell


Alternatively, could use Like.

For Each c In SomeRange
If c.Value Like "*" & your_word_here & "*" Then
'continue
End If
Next c

Sometimes exact text matching (InStr) is more useful, other times
pattern matching (Like) is.