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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to separate text in a single column

Status
Not open for further replies.

marie515

Technical User
Feb 27, 2004
71
US
Hi there,

I have a column with members names and the names are listed as follows:

James*R*Smith
Susan*L*Jameson
etc.

I would like to separate the 1st and last name into two separate columns. Can you advise me how I can tell the data to pull all characters to the left of the 1st "*" and to the right of the 2nd "*"?

Thank you.
 
Try this (tested with your 3 exemples):
LastName: Mid(Name, InStr(1+InStr(Name, "*"), Name, "*")+1)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
That's even better PHV.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top