Multiple Find/Search Criterias

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
'*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
 
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
 
Back
Top