# How to extract an email address from text in Google Sheets

Use REGEXEXTRACT with an email pattern: =IFERROR(REGEXEXTRACT(A2,"[\w.+-]+@[\w-]+\.[\w.-]*\w"),"").

**Google Sheets:** `=IFERROR(REGEXEXTRACT(A2,"[\w.+-]+@[\w-]+\.[\w.-]*\w"),"")`

**Excel:** Excel 365 has REGEXEXTRACT, and the same pattern works there. Older versions have no pattern matching; use Flash Fill (Ctrl+E) for a one-off.

## Example

Sample data (row 1 is the header):

| A | B |
| --- | --- |
| Message | Email |
| Please contact lena.park@northwind.example for details |  |
| Reply to omar@contoso.example. |  |
| Sent by p.shah+orders@fabrikam.example on Monday |  |
| No email in this one |  |
| Contact: TOM.BECKER@LITWARE.EXAMPLE |  |

Formula in B2, filled to B6: `=IFERROR(REGEXEXTRACT(A2,"[\w.+-]+@[\w-]+\.[\w.-]*\w"),"")`

Result: lena.park@northwind.example; omar@contoso.example; p.shah+orders@fabrikam.example; ; TOM.BECKER@LITWARE.EXAMPLE

## How it works

The pattern is: name characters (letters, digits, dots, plus and minus), an @, a domain name, a dot, and an ending that must finish on a letter or digit. That last rule stops the period at the end of "omar@contoso.example." from being included. IFERROR turns the #N/A for messages without an address into a blank.

## Other ways

- `=LOWER(IFERROR(REGEXEXTRACT(A2,"[\w.+-]+@[\w-]+\.[\w.-]*\w"),""))`: Also lowercases the address, ready for matching against a contact list. (tom.becker@litware.example in lowercase.)

## Common mistakes

- Only the first address in a cell is returned.
- No pattern catches every valid address. This one covers the common forms; rare ones with quotes or IP addresses are missed.

## Questions

**How do I extract every email in the cell?**

Split into words and keep the matches: `=TEXTJOIN(", ",TRUE,ARRAYFORMULA(IFERROR(REGEXEXTRACT(SPLIT(A2," "),"[\w.+-]+@[\w-]+\.[\w.-]*\w"),"")))`.

**How do I check whether a cell contains an email at all?**

Use REGEXMATCH with the same pattern: `=REGEXMATCH(A2,"[\w.+-]+@[\w-]+\.\w+")`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/extract-an-email-address-from-text-in-google-sheets
