Excel functions / Text
Extract the first word
Pull out the first word of some text, such as a first name.
How it works
In Microsoft 365 the simplest way is TEXTBEFORE with a space: =TEXTBEFORE(A2," ").
In any version of Excel, combine LEFT and FIND. FIND returns the position of the first space, and LEFT takes everything up to one character before it: =LEFT(A2,FIND(" ",A2)-1).
If some cells contain a single word with no space, both methods return an error. Wrap them in IFERROR and fall back to the whole cell: =IFERROR(TEXTBEFORE(A2," "),A2).
Example
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Name | |||
| 2 | Nina Shah | nina.shah@example.com | Nina | |
| 3 | Omar Reid | omar@example.com | ||
| 4 | Mary Ann Lee | mary.lee@example.com | ||
| 5 |
Result: Nina. The space is at position 5, so LEFT takes 4 characters.
Tips
- Run TRIM first if the data may start with a space.
Practise Extract the first word
Try it yourself in a real spreadsheet, with instant feedback on every answer.