G
Guest
I have a long customer list. I want to go to a certain
customer
When I use
Dim NameWant
Sub FindCustomer()
NameWant = Range("B1") 'In this case it equals "co"
Cells.Find(What:=NameWant, After:=ActiveCell,
LookIn:=xlValues, lookat:= _
xlWhole, SearchOrder:=xlByColumns,
SearchDirection:=xlNext, MatchCase:=False) _
.Activate
Selection.End(xlToLeft).Select
End Sub
If you use "xlWhole" to query the list it doesn't return
anything because there is no cell in my list with
just "co"
When you use xlPart it returns the first customer that has
a "co" any where in the customer's name. I want find the
first customer that starts out with a "co"
oldjay
customer
When I use
Dim NameWant
Sub FindCustomer()
NameWant = Range("B1") 'In this case it equals "co"
Cells.Find(What:=NameWant, After:=ActiveCell,
LookIn:=xlValues, lookat:= _
xlWhole, SearchOrder:=xlByColumns,
SearchDirection:=xlNext, MatchCase:=False) _
.Activate
Selection.End(xlToLeft).Select
End Sub
If you use "xlWhole" to query the list it doesn't return
anything because there is no cell in my list with
just "co"
When you use xlPart it returns the first customer that has
a "co" any where in the customer's name. I want find the
first customer that starts out with a "co"
oldjay