Find or Search Problem

  • Thread starter Thread starter VBAvirgin
  • Start date Start date
V

VBAvirgin

Thank You Dave, your assistance is much appreciated. I attempted t
record my macro and then went in to edit it, and I thin
_that's_where_I_messed_up_.
Looking at your code, I'm trying to decipher where I could put
wildcard (*) option for the search in the event that the user doesn'
know the correct spelling. As it is, I believe it has to be an exac
match. Would it be a True/False or 0/1 variable?
I thought I was on the right track but obviously I was wrong. Thank yo
very much
 
Using the .find version:

Set FoundCell = .Cells.Find(what:="*" & myStr & "*", _
after:=.Cells(.Cells.Count), _
lookat:=xlPart, LookIn:=xlValues, _
searchorder:=xlByRows, _
searchdirection:=xlNext, _
MatchCase:=False)

(just wrapping the entered string with asterisks.)
 
Back
Top