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

D2=LEFT(A2,FIND(" ",A2)-1)
ABCD
1NameEmail
2Nina Shahnina.shah@example.comNina
3Omar Reidomar@example.com
4Mary Ann Leemary.lee@example.com
5

Result: Nina. The space is at position 5, so LEFT takes 4 characters.

Tips

Practise Extract the first word

Try it yourself in a real spreadsheet, with instant feedback on every answer.

Start the exercise

Related