Wild Cards

J

jswalsh33

I am using wild cards with "Find". My code is:
With Worksheets("Data").Cells(x, 3)
Set C = .Find(Sheets("Comp").Range("B9"), LookIn:=xlValues)
If Not C Is Nothing Then
s = "1"
End If
End With
Range ("B9") is Re*
This find finds Resch as well as Harrell and any other name with an re
sequence.

Is there a way to write this code such that it finds only those names that
start with Re?

Thanks for your help.

Jim
 
J

jswalsh33

Rick,

I just want to find any name that starts with re or Re. Upper or lower case
does not matter .

Thanks again for your help
 
J

jswalsh33

I may not made my last reply clear.

What I am looking for is a way to find names in a list with wild card by
typing in one or more of the name I am looking for. It could be as example
R*, or Re* or Rec* to find Resch. I am trying not to come up with Harrell or
Pirellie.
I hope I made it clear this time.

Jim
 
P

Patrick Molloy

for more complex patterns, you need to use the LIKE statement
so in your code
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top