Skip to content

How to remove everything after a character in Excel and Google Sheets

Topic:Text manipulation
Excel & Google Sheets
=LEFT(A2,FIND("@",A2)-1)

Verified example

Computed by a real spreadsheet engine on the sample data below.

Email
alice@example.com
bob@company.org
carol@domain.net
david@mail.co

=LEFT(A2,FIND("@",A2)-1)alice

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

Step by step

  1. 1Excel 365 / recent Excel: =TEXTBEFORE(A2,"@") returns everything before the @ — done. Add a fallback for cells without the delimiter: =TEXTBEFORE(A2,"@",,,,A2).
  2. 2Any Excel version and Google Sheets: =LEFT(A2,FIND("@",A2)-1) — FIND locates the delimiter, and LEFT keeps the characters before it (the -1 excludes the delimiter itself).
  3. 3Guard against cells with no delimiter (FIND returns #VALUE! there): =IFERROR(LEFT(A2,FIND("@",A2)-1),A2) returns the original text unchanged.
  4. 4Google Sheets alternative: =INDEX(SPLIT(A2,"@"),1) splits on the delimiter and keeps the first piece.
  5. 5No-formula route: select the column, open Find & Replace, search for @* (the delimiter followed by an asterisk wildcard) and replace with nothing — this edits the cells in place.

Tips

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

Frequently asked

What happens when the character is missing from a cell?

FIND returns #VALUE! and the formula errors. Wrap it: =IFERROR(LEFT(A2,FIND("@",A2)-1),A2) keeps the original text for those cells. TEXTBEFORE accepts a fallback directly as its sixth argument.

How do I remove text after the LAST occurrence of a repeated character?

Excel 365: =TEXTBEFORE(A2,".",-1) — the -1 means "count from the end". Otherwise use the SUBSTITUTE trick that swaps the last occurrence for a sentinel character and FINDs that.

Is there a way without formulas?

Yes — Find & Replace with a wildcard. Search for @* and replace with nothing: every cell is truncated at the @ in place. Works in both Excel and Google Sheets.

Is FIND case-sensitive?

Yes. FIND("x",…) will not locate "X". Use SEARCH for case-insensitive matching — the rest of the formula stays identical.

How is this different in Google Sheets?

LEFT + FIND works unchanged. Sheets also offers =INDEX(SPLIT(A2,"@"),1), but note SPLIT treats EACH character of the delimiter string as a separate delimiter — fine for single characters, surprising for multi-character delimiters.

More on Text manipulation

See all →

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

Last reviewed: