Home > Forum Home > Automating Data Analysis Tasks > Taking out middle names on a long list of names > Get First and Last Word in cell | Share |
Forum Topic | Login |
Get First And Last Word In Cell | Rate this: (3/5 from 1 vote) |
You can create a formula to extract the first word (first name) and the last word (last name) and then either keep them in separate columns or append them together in one column. Suppose that your names are in column A with the first in cell A2. The following formulas will get the first name and last name. First Name (first word): =LEFT(A2,IF(ISERROR(FIND(" ",A2,1)),LEN(A2),FIND(" ",A2,1)-1)) Last Name (last word): =IF(ISERROR(FIND(" ",A2)),"",RIGHT(A2,LEN(A2)-FIND("*",SUBSTITUTE(A2," ","*",LEN(A2)-LEN(SUBSTITUTE(A2," ","")))))) Enjoy. | ||
Excel Business Forums Administrator | ||
Posted by Excel Helper on |
View Full Post |
Find relevant Excel templates and add-ins for Get First and Last Word in cell in the Excel Business Solutions Directory |