Use =LEFT(A2,FIND(" ",A2)-1) for the first name and =MID(A2,FIND(" ",A2)+1,100) for the last name, then copy down.
=LEFT(A2,FIND(" ",A2)-1)
You have a list of full names in one column, like "Ana Silva" or "Ben Carter", and you need first and last names in separate columns for sorting, mail merge, or filtering. These formulas split the name at the first space.
Step by step
- Click the cell where you want the first name (for example B2).
- Type =LEFT(A2,FIND(" ",A2)-1) and press Enter.
- Click the cell where you want the last name (for example C2).
- Type =MID(A2,FIND(" ",A2)+1,100) and press Enter.
- Select B2:C2 and drag the fill handle down to copy the formulas to the other rows.
- If you want to remove the formulas, copy B2:C2, then use Paste Special › Values.
Try it here
Examples
1 Split a two-part name
FIND locates the space, and LEFT returns everything before it: Ana. This works when the name has one space between the first and last name.
| A | B | C | |
|---|---|---|---|
| 1 | Full Name | ||
| 2 | Ana Silva | Ana | |
| 3 | Ben Carter | ||
| 4 | Carla Mendes | ||
| 5 | David Lee | ||
| 6 | Eva Brown | ||
| 7 | Frank Wright | ||
| 8 | Grace Kim | ||
| 9 |
=LEFT(A2,FIND(" ",A2)-1)2 Get the last name
This starts just after the first space and returns up to 100 characters: Silva. If there is a middle name, it returns the middle and last names together (see the mistakes below for just the last word).
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Full Name | |||
| 2 | Ana Silva | Silva | ||
| 3 | Ben Carter | |||
| 4 | Carla Mendes | |||
| 5 | David Lee | |||
| 6 | Eva Brown | |||
| 7 | Frank Wright | |||
| 8 | Grace Kim | |||
| 9 |
=MID(A2,FIND(" ",A2)+1,100)3 Handle names with middle names
If a name has a middle name, the first formula still returns the first name. The last name formula returns everything after the first space, so it includes the middle name. Use this when you only need the first name and the rest.
| A | B | C | |
|---|---|---|---|
| 1 | Full Name | ||
| 2 | Ana Maria Silva | Ana | |
| 3 | Ben Carter | ||
| 4 | Carla Mendes | ||
| 5 | David Lee | ||
| 6 | Eva Brown | ||
| 7 | Frank Wright | ||
| 8 | Grace Kim | ||
| 9 |
=LEFT(A2,FIND(" ",A2)-1)Other ways to do it
| Formula | Use it when |
|---|---|
=TEXTBEFORE(A2," ") | In Microsoft 365 or Excel 2024, this is shorter and easier to read for the first name. |
=TEXTAFTER(A2," ") | In Microsoft 365 or Excel 2024, use this for the last name; it returns everything after the first space. |
=LEFT(A2,FIND(" ",A2)-1) | Use this in older Excel versions where TEXTBEFORE and TEXTAFTER are not available. |
Practise it
Free exercises with instant feedback. No sign-up needed.
Common mistakes
- The formula returns #VALUE! because there is no space in the cell (single name). Wrap the formula in IFERROR, for example =IFERROR(LEFT(A2,FIND(" ",A2)-1),A2).
- The last name formula returns the middle name as well. That is expected if there is a middle name. To get only the last word, use =TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",100)),100)).
- The formulas show in the cells instead of results. Make sure the cell format is not Text. Format the cells as General, then re-enter the formula.
Questions people also ask
How do I split names with a comma, like "Silva, Ana"?
Use =LEFT(A2,FIND(",",A2)-1) for the last name and =MID(A2,FIND(",",A2)+2,100) for the first name.
Can I split first and last names without formulas?
Yes. Use Data › Text to Columns with Space as the delimiter, or Power Query.
What if there are extra spaces?
Wrap the cell reference in TRIM first, for example =LEFT(TRIM(A2),FIND(" ",TRIM(A2))-1).
Functions used
Every formula on this page was checked by SheetSkill’s spreadsheet engine. All how-to guides