Extracting the Domain from an Email ID
If you have a list of email IDs and want to extract the domain for each ID in Excel, you can use a simple formula. This tutorial will guide you through writing the formula.
Formula: =RIGHT(A2,LEN(A2)-SEARCH(“@”,A2))
Extracting the Domain from an Email ID
To understand this formula, let’s break it down into three parts:
Get the Position of “@” in the Email:
First, you need to determine the position of the “@” symbol in the email ID. The domain in an email ID starts after the “@” symbol. For this, you can use the SEARCH function.
In the given example, the result is 6, indicating that the “@” symbol is at the 6th position in the email.
Determine the Length of the Domain:
Next, count the number of characters in the domain part of the email. To do this, use the LEN function to get the count and subtract the position of the “@” symbol from it.
In the snapshot, the domain “yahoo.ca” has 8 characters, which is the result obtained.
Extract the Domain:
With the length of the domain known, you can use the RIGHT function to extract the domain from the right side of the cell.
The RIGHT function uses the count of domain characters to extract it from the end of the email ID.
By applying this formula, you will get the domain extracted from the email ID.