I am trying to extract last names from list of full names. I've got the standard down to pull a common first-last name (John Smith). I am running into a problem with names that have multiple last names (John Smith Anderson). Here is the code I have that works for the common name:
Is there a relatively straight-forward way to handle names like this? I imagine I would have to use an If-Then to identify whether the full name has a single or multiple last names, but I'm not sure how to manipulate the multiple last name scenario.
Code:
trimStr = Trim(Right(str, InStr(str, " ")))