View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Wildcard use in comparason.. Please help

Try it this way...

For Each c In myrange
If InStr(1, c.Value, "Artist", vbTextCompare) 0 Then

--
Rick (MVP - Excel)


"KJ MAN" wrote in message
...
Here's my code.

For Each c In myrange
If UCase(c.Value) = UCase(Artist) Then

I need the match to return * Artist *. I need to to be
an exact match, or a match with characters preceeding and/or following.
I tried
Ucase("*" & Artist & "*")
and also
Ucase(* & Artist & *)

Neither worked. Any suggestions?