PoliteDraft.
Text Functions

How to Extract Email Domains in Excel

By PoliteDraft TeamUpdated Dec 2025

Whether you're analyzing a customer list or cleaning up marketing data, extracting the domain name (e.g., "gmail.com") from a list of email addresses is a common and crucial task.

This guide covers three methods, from the modern and simple to the classic and universally compatible.

Method 1: TEXTAFTER (The Modern Way)

If you have Microsoft 365 or a recent version of Excel, the TEXTAFTER function is the cleanest and most efficient solution.

=TEXTAFTER(A1, "@")

Method 2: RIGHT, LEN, and FIND (The Classic Combo)

For older versions of Excel (2019 and earlier) that don't have TEXTAFTER, you need to combine three functions.

=RIGHT(A1, LEN(A1)-FIND("@", A1))

Method 3: Flash Fill (The Magic Way)

If you prefer not to use formulas at all, Excel's Flash Fill feature is magical.

  1. In the cell next to your first email (e.g., in B1 if email is in A1), manually type the domain name. For `john.doe@example.com`, you would type `example.com`.
  2. Press Enter.
  3. Start typing the domain for the second email in B2. Excel will recognize the pattern and show a gray preview of all the other domains.
  4. Simply press Enter to accept, and the entire column will be filled instantly.

FAQ: Handling Complex Cases

How do I handle emails with names, like "John Doe "?

This is where TEXTAFTER shines again. You can chain it:

=TEXTAFTER(TEXTAFTER(A1, "<"< /span>), "@")

The inner TEXTAFTER gets everything after the `<`, and the outer one gets everything after the `@` from that result.

What if some cells are blank?

Wrap your formula in `IFERROR` to avoid ugly error messages:

=IFERROR(TEXTAFTER(A1, "@"), "")

Struggling with a complex formula?

Describe your data problem in plain English, and our AI will build the exact formula you need.

Go to AI Formula Bot