How to extract the first word (text before the first space)
✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)Pull the first word from a cell, e.g. a first name out of a full name.
The formula
| App | Formula | Notes |
|---|---|---|
| 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. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned John for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run Excel.
Functions used
LEFT · FIND — see full Excel, Google Sheets & LibreOffice compatibility for each.
Related recipes
- How to extract the first name from a full name
- How to extract the username from an email address
- How to flip "Last, First" into "First Last"
- How to remove everything after a character
- How to capitalize only the first letter (sentence case)