FormulaCraft

TEXTBEFORE

TEXTBEFORE returns the portion of a string that comes before a given delimiter character or substring, with optional arguments to control which occurrence to use and case sensitivity. Use it to extract the username from an email address, the first name from a full name, or any leading segment from a structured text string.

Excel
=TEXTBEFORE(A2,"@")
Google Sheets
=TEXTBEFORE(A2,"@")

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

How it works

  1. 1Reference the cell containing the structured text string.
  2. 2Provide the delimiter that marks where to cut, such as "@" for email addresses or " " for first name extraction.
  3. 3Enter =TEXTBEFORE(text, delimiter) to return everything before the first occurrence of that delimiter.

Need a version for your data?

Try: “Extract just the username portion from a list of email addresses before the @ symbol

Related

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: