enquirerfm Posted May 6, 2010 Posted May 6, 2010 I want to delete the last three words when I import records into a DB - this is how the whole string looks: Mr John Doe 2009 Size: 12-13 This is what I want: Mr John Doe It needs to be worked around deleting the right hand words because the number on the left vary (e.g. there could be Mr John Henry Doe) What is the expression for deletion of RightWords - e.g. deleting rather than returning the found text? Thx for any help.
Raybaudi Posted May 6, 2010 Posted May 6, 2010 What about: LeftWords ( YourField ; WordCount ( YourField ) - 3 )
enquirerfm Posted May 6, 2010 Author Posted May 6, 2010 (edited) Thank you worked like a charm. What if I now want to KEEP/GET the 3rd word from the right (which is a number)and paste it into another empty field? Edited May 6, 2010 by Guest
comment Posted May 6, 2010 Posted May 6, 2010 Try = LeftWords ( RightWords ( YourField ; 3 ) ; 1 ) This assumes your field has at least 3 words - otherwise it will return the first word.
enquirerfm Posted May 6, 2010 Author Posted May 6, 2010 Thx - also worked! These are difficult to get the hang of especially when nested.
Recommended Posts
This topic is 5314 days old. Please don't post here. Open a new topic instead.
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