Let’s say you have a list of email IDs, and now you want to extract the domain for each ID. In Excel, a simple formula can extract the domains. And in this tutorial, we learn to write this formula.
=RIGHT(A2,LEN(A2)-SEARCH("@",A2))
The above formula helps you to get the domain from the email. To understand this formula, you need to split it into three parts.
Get the Position of @ from the Email
First, you need to get the Position of the “@” in the email ID. As you know, in an email ID, the domain start after the “@”. For this, you need to use the SEARCH function.
In the above example, you have got 6 in the result, meaning the Position of “@” is 6th in the email.
Count the Length of the Domain
Next, get the count of characters from the domain part of the email. And for this, you need to use the LEN function to get the count. And then deduct the Position of the “@” from it.
In the snapshot, we have the domain “yahoo.ca”, which has 8 characters, and that’s what you have got in the result.
Extract Domain
You know the length of the domain in the email ID. So you can use the RIGHT function to get the domain from the right side of the cell.
RIGHT uses the count of domain characters and gets it from the email ID’s end.
Get the Excel File
Related Formulas
- Create a Horizontal Filter in Excel
- Create a Star Rating Template in Excel
- Get File Name in Excel
- Get Sheet Name in Excel
- Quickly Generate Random Letters in Excel
- Randomize a List (Random Sort) in Excel
- Count Characters in Excel (Cell and Range)
- Get File Path (Excel Formula)
- Get the Value from a Cell
- Back to the List of Excel Formulas