How to extract the username from an email address
✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)Get the part before the @ — for display names, matching, or de-duplication.
The formula
| App | Formula | Notes |
|---|---|---|
| Excel (desktop) | =LEFT(A2,FIND("@",A2)-1) | Excel 365: =TEXTBEFORE(A2,"@"). |
| Google Sheets | =LEFT(A2,FIND("@",A2)-1) | Identical; also =REGEXEXTRACT(A2,"^[^@]+"). |
| LibreOffice Calc | =LEFT(A2,FIND("@",A2)-1) | Identical. |
How it works
FIND locates the @ and LEFT keeps everything before it: "ada.lovelace". The companion extraction — the domain after the @ — is covered in the extract-domain-from-email recipe; together they split any address in two. To go further and title-case a name out of the username, chain the sentence-case and substitute-dots-for-spaces patterns: =PROPER(SUBSTITUTE(LEFT(A2,FIND("@",A2)-1),"."," ")) gives "Ada Lovelace".
Verified, not just documented
We ran =LEFT(A2,FIND("@",A2)-1) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned ada.lovelace — 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 ada.lovelace 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 desktop 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 first word (text before the first space)
- How to flip "Last, First" into "First Last"
- How to remove everything after a character
- How to capitalize only the first letter (sentence case)