Position of a character in a string

A

Alan T

I have string, eg.
Alan
Alan.1
Alan.11

I want to find the position of the '.' in the string then retrieve the left
and right side of full stop.
 
G

Gary''s Student

Sub Alan_T()
s = "Alan.11"
MsgBox (InStr(s, "."))
lefthalf = Split(s, ".")(0)
MsgBox (lefthalf)
righthalf = Split(s, ".")(1)
MsgBox (righthalf)
End Sub
 
Top