Multiple Find/Search Criterias

G

Guest

Hi all,

I was wondering if there is anyway i simplify the following code to do
multiple search criterias.

On Error Resume Next

Cells.Find(What:="valdate", After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate

Cells.Find(What:="invaldate", After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate

On Error Goto 0

Thanks in advance
Ray
 
T

Tushar Mehta

'*valdate' (w/o the quotes) will work in this specific instance.
However, AFAIK, there is no generic 'or' or 'and' capability within the
Find method.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 
G

Guest

Hi Tushar

Thank you for your tip, i guess i will

have to find a better way,

coz i am searching for multiple different

words and cannot just use a wildcard.

Have a good day.

Rgds
Ray
 

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