← All how-to recipes

How to extract the first word (text before the first space)

✓ Verified in LibreOffice 25.8.7.3

Pull the first word from a cell, e.g. a first name out of a full name.

The formula

AppFormulaNotes
Excel=LEFT(A2,FIND(" ",A2)-1)Or =TEXTBEFORE(A2," ") in Excel 365.
Google Sheets=LEFT(A2,FIND(" ",A2)-1)Or =INDEX(SPLIT(A2," "),1).
LibreOffice Calc=LEFT(A2,FIND(" ",A2)-1)Identical.

How it works

FIND locates the position of the first space; LEFT then takes every character before it. FIND(' ','John Smith') is 5, so LEFT(...,4) returns 'John'. Wrap in IFERROR for cells that have no space.

Verified, not just documented

We ran =LEFT(A2,FIND(" ",A2)-1) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned John — exactly the expected result. Every formula here is confirmed by actually executing it.