# Excel: How to Extract Email Address from Text String

You can use the following formula to extract an email address from a text string in Excel:

```=IFERROR(TRIM(RIGHT(SUBSTITUTE(LEFT(A2,FIND(" ",A2&" ",FIND("@",A2))-1)," ",REPT(" ",LEN(A2))),LEN(A2))), "")
```

This particular formula extracts the email address from the text string in cell A2.

If no email address is found in cell A2, the formula simply returns a blank.

The following example shows how to use this formula in practice.

## Example: How to Extract Email Address from Text String in Excel

Suppose we have the following column of text strings in Excel:

Suppose we would like to extract the email address from each text string.

To do so, we can type the following formula into cell B2:

```=IFERROR(TRIM(RIGHT(SUBSTITUTE(LEFT(A2,FIND(" ",A2&" ",FIND("@",A2))-1)," ",REPT(" ",LEN(A2))),LEN(A2))), "")
```

We can then click and drag this formula down to each remaining cell in column B:

Column B now contains the email address from each text string in column A.

Note that cell A5 didn’t contain an email address so the formula simply returned a blank value.

Note: If a cell contains more than one email address, this formula will only return the first email address.

The following tutorials explain how to perform other common operations in Excel:

May 13, 2024
April 25, 2024
April 19, 2024
April 18, 2024
April 18, 2024

## One Reply to “Excel: How to Extract Email Address from Text String”

1. Octavian Tonica says:

It is exactly the formula I was looking for!
Much appreciated!