DB_Noob Posted August 11, 2008 Posted August 11, 2008 Hello, I have/capture the following data and it can look like this: 12345 12345-xx 123456-xx 1234567-xx I want to make a new calcuation field that strips away the "-" AND anything to the right of it. So the above data would look like this in the new field: 12345 12345 123456 1234567 Any tips/help would be awesome! Thanks, Ryan
Lee Smith Posted August 11, 2008 Posted August 11, 2008 Try: Left ( YourTextField ; Position ( YourTextField ; "-" ; 1 ; 1 ) - 1 )
DB_Noob Posted August 11, 2008 Author Posted August 11, 2008 Thanks, I'll try it out when I get a chance!!!
comment Posted August 11, 2008 Posted August 11, 2008 Try: LeftWords ( Substitute ( text ; "-" ; " " ) ; 1 ) Another option would be simply: LeftWords ( text ; 1 ) but this will fail if the first "x" can be a digit.
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