In a worksheet, names are listed in column A, and the last name has to be copied to column B. As in the previous example, the space between the first and last names has to be determined with the SEARCH function. This function returns the position of the desired character inside a text string starting from start_num. The MID function then returns a specific number of characters starting from a desired position inside a text string.
MID(text, start_num, num_chars)
text: Text string containing the desired characters.
start_num: Position of the first character to extract from the text.
num_chars: Number of characters to be extracted.
To separate the last name from the first name:
1. In a worksheet, enter a series of full names in cells A2:A11.
2. Select cells B2:B11 and type the following formula: =MID(A2,SEARCH(" ",A2)+1,100).
3. Press <-Ctrl+Enter->.
USE THE MID FUNCTION TO SEPARATE LAST NAME FROM FIRST NAME USING MICROSOFT EXCEL |
No comments:
Post a Comment