Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

string

Status
Not open for further replies.

Maximus007

Technical User
Jul 26, 2004
248
0
0
US
I need some help on how to get the last name from a string. Exampl: Doe, John

How can I get just the Doe only or what function can I use to accomplish that?
 
You could just use the "SPLIT" function and split that line on the ",".
 
A starting point:
strFullName = "Doe, John"
MsgBox Left(strFullName, InStr(strFullName, ",") - 1)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
It's working great!

Thank you for sharing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top