View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Andy Smith Andy Smith is offline
external usenet poster
 
Posts: 13
Default Wild Card for partial matches.

In regular Excel, the Edit/Find command accepts ? and * as wildcards by
default.

In VBA, look up the LIKE operator.

--

--Andy Smith



"Kevin" wrote:

I have a column with multiple numbers in them,
example of one cell 0502,0399

I want to be able to find partial matches like just the 0502. right now I
have this..

For Each c In MyRange
If c = "*0502*" Then
MsgBox "yes"
End If
Next c

I'm trying to use the * as a wild card but its looking it up as if I want to
find the * as well as the numbers. Any Ideas?