RIGHT / Data Analyst

Extract Domain Name from Email

I need to pull just the domain (e.g., 'gmail.com') from a list of customer email addresses for segmentation.

formula.xlsx
=RIGHT(A2, LEN(A2) - FIND("@", A2))

How it works: This formula works by first locating the position of the '@' symbol within the email address using `FIND("@", A2)`. Then, `LEN(A2)` calculates the total length of the email address. By subtracting the position of the '@' symbol from the total length (`LEN(A2) - FIND("@", A2)`), we get the exact number of characters that represent the domain name (including the dot and top-level domain) starting from the character immediately after the '@' symbol. Finally, the `RIGHT` function extracts precisely that many characters from the right end of the email address, effectively isolating the domain name.

Data Setup

Email Address
john.doe@example.com
jane.smith@gmail.com
bob.johnson@outlook.com
alice.wong@company.net

Step-by-Step Guide

1

Identify the column containing the email addresses (e.g., Column A).

2

In an adjacent empty cell (e.g., B2), enter the formula: `=RIGHT(A2, LEN(A2) - FIND("@", A2))`.

3

Press Enter to apply the formula to the first email address.

4

Drag the fill handle (the small square at the bottom-right corner of cell B2) down to apply the formula to the rest of your email addresses.

Explore More