View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Andy Andy is offline
external usenet poster
 
Posts: 10
Default Extract First and Last Name

Lynn

If your last name is always first with a comma at the end, and there is
always a space after the first name, then you could use the following
(not particularly tidy, but it appears to work).

If the names are all in column A, and you want the surname in column B
and the first name in column C, then put:

=LEFT(A1,FIND(",",A1)-1) in cell B1, and

=LEFT(MID(A1,FIND(" ",A1)+1,LEN(A1)),FIND(" ",MID(A1,FIND("
",A1)+1,LEN(A1)))-1) in cell C1

and then copy down as needed.

Andy


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!