ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Extract First and Last Name (https://www.excelbanter.com/excel-programming/275457-re-extract-first-last-name.html)

Andy

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!


All times are GMT +1. The time now is 06:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com