I am writing a macro that will scrub down an excel list. I need to take a list of names and remove the first name, so “John Smith” becomes “Smith”. I know how to delete text after a space but before a space seems more tricky.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here’s a sub that loops through all cells in the named range called “rng_Names” and removes all but the last word.
Update
The following sub Just removes the first word:
Update the Second
The following sub removes just the first word, as well as the string ” jr” if it exists