This task demonstrates how to separate first and last names. In a worksheet, full names are listed in column A. We want to copy the first name to column B. The SEARCH function can be used to determine the space between the parts of the text string. This function returns the position of the searched character inside a text
string.
SEARCH(find_text, within_text, start_num)
find_text: The text or character for which you are searching. Wildcard characters, question marks (?), and asterisks (*) can be used in find_text. A question mark matches any single character, and an asterisk matches any sequence of characters. To find a question mark or asterisk, type a tilde (~) before the character.
within_text: The text you want to search for find_text.
start_num: The start position for the search function within text; if there is no start_num defined inside the function, Excel sets it to 1.
To separate the first and last names:
1. In a worksheet, enter a series of full names in cells A2:A11.
2. Select cells B2:B11 and type the following formula: =LEFT(A2,SEARCH(" ",A2)-1).
3. Press <-Ctrl+Enter->.
USE THE SEARCH FUNCTION TO SEPARATE FIRST NAME FROM LAST NAME |
No comments:
Post a Comment