View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Searching for a unique charater in a string, vb

Use Instr. like

If Instr(vcsel_name, "VO") 0 Then
' it is in there
Else
'it is not
End If

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Azazal " wrote in message
...
hello,

Does anyone know how to search for a unique charater in a string. For
example,

Dim vcsel_name as string

' vcsel_name is a variable and changes as I compile my data, I need to
separate the data according to the last two characters of the string.
Therefor I need something like

if vcsel_name.find = "VO" then

(body of code)

end if

obviously I made up the .find function, but can anyone tell me the
proper function I could use to accomplish this task.

Thanks


---
Message posted from http://www.ExcelForum.com/