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!

Editing a string

Status
Not open for further replies.

progressive7

Technical User
Jul 25, 2002
33
GB
hi all,

i have string which at some point contains a - i want to take every thing on the right hand side of the dash, at the moment i can use instr() to determine the point in the string where the dash appears. but if i try and use right() it wants me to tell it how many chars to take. because the string variys in lenght i want a function that will take everything to the right from a determinied point.

any ideas's

thanks
 
Take a look at the Mid function (the 3rd argument is optional):
Mid(yourString, 1 + InStr(yourString, "-"))

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top