How can I extract the domain from an email address in Excel?

Extracting the domain from an email address in Excel refers to the process of isolating and obtaining the unique identifier that represents the email provider for a given email address. This can be achieved by using various Excel functions and formulas, such as the RIGHT and FIND functions, to manipulate the email address and extract the domain name. Doing so can be helpful in organizing and categorizing email addresses for data analysis or management purposes.

Excel: Extract Domain from Email Address


You can use the following syntax to extract the domain name from an email address in Excel:

=TEXTAFTER(A2, "@")

This particular formula extracts the domain name from the email address in cell A2.

For example, suppose cell A2 contains the following email address:

This formula will return just the domain name from this email address:

  • statology.org

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

Example: Extract Domain from Email Address in Excel

Suppose we have the following column of email addresses in Excel:

Suppose we would like to extract the domain name from each email address in column A.

We can type the following formula into cell B2 to do so:

=TEXTAFTER(A2, "@")

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

Excel extract domain name from email address

Column B now contains the domain name from each email address in column A.

And so on.

How This Formula Works

The TEXTAFTER function in Excel extracts all text in a cell after a specific character or substring.

This function uses the following syntax:

TEXTAFTER(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_found])

where:

  • text: Text to search
  • delimiter: Character or substring to extract text after
  • instance_num (optional): Instance of delimiter after which to extract text (default is 1)
  • match_mode (optional): 0 = case-sensitive (default), 1 = case-insensitive
  • match_end (optional): Treat end of text as delimiter (disabled by default)
  • if_not_found (optional): Value to return if delimiter is not found

Recall that we used the following syntax to extract the domain name from each email address:

=TEXTAFTER(A2, "@")

By using a value of @ for the delimiter, we were able to specify that we wanted to extract the text after the @ in each string.

This is equivalent to extracting just the domain name from each email address.

Note: You can find the complete documentation for the TEXTAFTER function in Excel .

Additional Resources

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

x