bonngo Posted June 21, 2007 Posted June 21, 2007 I have a field that has 2-3 characters followed by a hypen that I need to remove. The result needs to be the remaining text. The problem for me is because of the varying number of characters. For ex: V1-John Smith I want returned as: John Smith and V25-Bill Jones returned as: Bill Jones Thanks in advance for any help.
comment Posted June 21, 2007 Posted June 21, 2007 Try Right ( text ; Length ( text ) - Position ( text ; "-" ; 1 ; 1 ) )
Fitch Posted June 21, 2007 Posted June 21, 2007 Here's the same thing written slightly differently: Let ( [ name = your::field ; dash = Position ( name ; "-" ; 1 ; 1 ) ; chars = Length ( name ) - dash ] ; Right ( name ; chars ) )
Lee Smith Posted June 21, 2007 Posted June 21, 2007 I know what you mean, I posted the same calculation as comment, only to discover he had beat me by a few seconds. Oh well, I probably stole it from him in the first place. LOL Lee
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now