This post will guide you how to split the full name to the first name and last name in the different cells in excel. How to create an excel formula to split the full name to first name and last name. How to get the middle name from the full name string using a formula.
Split full name to first and last name Assuming that you have a full name list in a table or range B2:B3 and you want to get the first name from this full name list and then put it in another cell. Or you just only want to extract the last name from the full name string, and put it in other cell. You can use a combination of the and to create a formula to extract the first name from the full name. You can create another formula based on the, the, the FIND function and the to extract the last name. Split full name to get first name You can write down the following formula to get the first name: =(B2, (' ',B2,1)-1) Let’s see how this formula works: = (” “,B2,1)-1 This formula returns the position of the first space character in the full name string. And the number is subtracted 1 to get the length of the first name in the full name string. =(B2, FIND(” “,B2,1)-1) This formula will extract the first name from the full name string based on the length of the first name returned by the FIND function.
To separate your contacts' first and last names in Excel 2003, 2007 and 2010: Make sure there is an empty column directly to the right of the information you wish to split. Note: This can be done by highlighting the column to the right of the column you wish to split, then right-clicking and choosing Insert. Then follow these steps: Click on the heading of the column containing your contacts' first and last names to highlight the column. Click Data tab and select option Text to Columns. Select the Delimited radio button. Under Delimiters, clear all the check boxes and check only the Space check box.
Split full name to get Last name You can use the following formula to extract the last name. =(B2, (B2)- ('#',(B2,' ','#',2),1)) Let’s see how this formula works: = (B2,” “,”#”,2) This formula locate the position of the second space string and then replace it with hash character. It goes into the FIND function as its Text argument.
= FIND(“#”,SUBSTITUTE(B2,” “,”#”,2),1) This formula returns the position of the hash character in the text string that returned by the SUBSTITUTE function. The number is also the position of the second space character in the full name string. = (B2)- FIND(“#”,SUBSTITUTE(B2,” “,”#”,2),1). This formula returns the length of the last name in the full name string.
= This formula extracts the right most characters based on the length of the last name. Split full name to get Middle name If you want to extract the middle name from the full name string, you can write down the following formula: = (B2,(' ',B2)+1,FIND('#',(B2,' ','#',2),1)- FIND(' ',B2,1)-1) Let’s see how this formula works: This formula returns the position of the hash character in the text string that returned by the SUBSTITUTE function.
The number is also the position of the second space character in the full name string. = FIND(” “,B2,1)-1 This formula returns the position of the first space character in the full name string. And the number is subtracted 1 to get the length of the first name in the full name string. =(“#”,SUBSTITUTE(B2,” “,”#”,2),1)- FIND(” “,B2,1)-1 This formula returns the length of the middle name in the full name string. And it goes into the MID function as its numchars argument. = FIND(” “,B2)+1 This formula returns the position of the first character of middle name in the full name string. It goes into the MID function as its startnum argument.
= This formula extracts the middle name from the full name based on the startnum and numchars arguments. Related Formulas.
If you want to extract the first word from a text string in a cell, you can use a combination of the IF function, the ISERR function, the LEFT function and the FIND function to create a complex excel formula. If you have multiple lines in a cell and each line is separated by line break character or press “alt + enter” key while you entering the text string into cells, and you need to extract the multiple lines into the separated rows or columns, you can use a combination with the TRIM function, the MID function, the SUBSTITUTE function, the REPT function, the LEN function to create a complex excel formula.
If you want to get the last word from a text string, you can create an excel formula based on the RIGHT function, the LEN function, the FIND function and the SUBSTITUTE function. If you want to extract the nth word from a text string in a single cell, you can create an excel formula based on the TRIM function, the MID function, the SUBSTITUTE function, the REPT function and the LEN function. If you want to count the number of a specific word in a single cell, you need to use the SUBSTITUTE function to remove all that certain word in text string, then using LEN function to calculate the length of the substring that without that specific word. Assuming that you have a text string that contains email address in Cell B1, and if you want to extract word that begins with a specific character “@” sign, you can use a combination with the TRIM function, the LEFT function, the SUBSTITUTE function, the MID function, the FIND function, the LEN function and the REPT function to create an excel formula.