FormulaCraft

How to extract an email address from text in Excel and Google Sheets

Topic:Text manipulation

Heads up: Excel and Google Sheets do this differently.

Excel
=TRIM(MID(SUBSTITUTE(B2,"@",REPT(" ",LEN(B2))),MAX(1,FIND("@",B2)-LEN(B2)),LEN(B2)))
Google Sheets
=REGEXEXTRACT(B2, "[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}")

Verified example

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

headertext
examplePlease contact us at support@example.com for assistance.
example2Reach out via sales@example.org or info@example.net
example3No email here

=TRIM(MID(SUBSTITUTE(B2,"@",REPT(" ",LEN(B2))),MAX(1,FIND("@",B2)-LEN(B2)),LEN(B2)))Please contact us at support

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. 1In Excel, use the SUBSTITUTE, MID, and TRIM functions to isolate the email address.
  2. 2In Google Sheets, use the REGEXEXTRACT function with a regular expression pattern to find the email address.
  3. 3Ensure your text cell contains the email address you want to extract.

Tips

Need the Google Sheets version instead? Open Sheets variant in workspace →

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 if there are multiple email addresses in the text?

For multiple emails, you would need to modify the formula to handle each case separately, possibly using array formulas.

Does this work with all email formats?

The provided formulas should work with most standard email formats, but very unusual formats might require adjustments.

Can I use this formula on a column of text?

Yes, you can drag the formula down to apply it to other cells in the column.

More on Text manipulation

See all →

Formulas used

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

Last reviewed: