View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
T-容x[_43_] T-容x[_43_] is offline
external usenet poster
 
Posts: 1
Default Find Text within Text String


Hi Lenny! To find a substring w/in a string, you use the InsSt
function:

InStr([start, ]string1, string2[, compare])

InStr(1, A, B)

It returns the position of string2 in string1 if found.

See VBA help for more details.

Lenny_821 Wrote:
Hi All,

I've got bit of a puzzle here. I've got 2 text strings for example A
"Model A" and B = "A". Now I want to, in VBA, find Text B within Tex
A. How do I do that?

Thanks:)

Lenn


--
T-容
-----------------------------------------------------------------------
T-容x's Profile: http://www.excelforum.com/member.php...fo&userid=2657
View this thread: http://www.excelforum.com/showthread.php?threadid=40036