J
John
Everything on the sheet is formatted as text but all the text is
numbers. Treat everything as strings in the code.
Problem:
Looking for the string "29" in the range Buddies. A=29 where A is a
string variable. All of the range Buddies is formated as text although
it is all numbers.
Set Third = Buddies.Find(what:=A, lookat:=xlWhole) Doesn't find string A
Set Third = Buddies.Find(what:=Val(A), lookat:=xlWhole) DOES find string A
Why is this? I'm looking for a string "29" in a range of strings but can
only find it if I look for a value. It's confusing.
John
numbers. Treat everything as strings in the code.
Problem:
Looking for the string "29" in the range Buddies. A=29 where A is a
string variable. All of the range Buddies is formated as text although
it is all numbers.
Set Third = Buddies.Find(what:=A, lookat:=xlWhole) Doesn't find string A
Set Third = Buddies.Find(what:=Val(A), lookat:=xlWhole) DOES find string A
Why is this? I'm looking for a string "29" in a range of strings but can
only find it if I look for a value. It's confusing.
John