ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Searching for a unique charater in a string, vb (https://www.excelbanter.com/excel-programming/294983-re-searching-unique-charater-string-vbulletin.html)

Bob Phillips[_6_]

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/





All times are GMT +1. The time now is 10:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com