vba exact match -- not xlPart

want2b

Board Regular
Joined
Jan 27, 2004
Messages
89
What can I replace xlPart with to cause a search to find an exact match.
Sorry don't have help installed on this machine and search either found too much or none.
 

Some videos you may like

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
L

Legacy 98055

Guest
xlWhole

also note the MatchCase argument which can be either True or False...

Tom
 

want2b

Board Regular
Joined
Jan 27, 2004
Messages
89
Thank you very much

I had tried Exact and Match that blew up as soon as entered
and All which it took but nothing happened when it ran.

Whole does it

Thanks
 

pfarmer

Well-known Member
Joined
Jul 6, 2005
Messages
550
want2b said:
Thank you very much

I had tried Exact and Match that blew up as soon as entered
and All which it took but nothing happened when it ran.

Whole does it

Thanks

This is a VBA search routine I use that is case insensitive:

Code:
Set X = ws.Columns(z).Find(Me.TextBox1.Text, after:=ws.Cells(6, z), LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False)

Perry
 

Watch MrExcel Video

Forum statistics

Threads
1,118,386
Messages
5,571,836
Members
412,420
Latest member
grace_abar
Top