logo
search
Function Problems

How to Remove a Domain from Email Addresses in Excel

Kushani NimanthikaKushani Nimanthika Oct 12, 2026 868 views

Question details

The user needs to extract usernames from a list of email addresses by stripping out the domain portion that follows the @ symbol.

How to Remove a Domain from Email Addresses in Excel
Product
Excel
Device & OS
not provided
Scenario
Cleaning up a large dataset of email addresses to isolate and retain only the usernames for reporting or data management purposes.
Observed behavior
The user has hundreds of email addresses formatted as username@company.com and wants to bulk-remove the @company.com segment without doing it manually.
Before you start

Ensure your email addresses are organized in a single, continuous column and insert an empty column directly next to it to accommodate the extracted usernames.

Solution 1Recommended

Use the TEXTBEFORE Formula

The TEXTBEFORE function allows you to quickly extract all text that appears before a specified delimiter, making it the most precise way to remove email domains.

This formula is highly reliable and will dynamically update if you ever change the original email address in the source cell.

1
Select the adjacent cell

Click on the first empty cell next to your list of email addresses (for example, cell B2 if your first email is in A2).

2
Enter the formula

Type the formula =TEXTBEFORE(A2, "@") into the cell and press the Enter key. The username should now appear.

3
Apply to the entire column

Click on cell B2 again, hover over the small square in the bottom-right corner until your cursor turns into a crosshair, and drag it down to fill the formula for all remaining emails.

Use the TEXTBEFORE Formula
Formula Advantage: Using a formula ensures that your extracted usernames remain linked to the original data, automatically fixing itself if typos in the original emails are corrected later.
Data Processing in WPS Spreadsheet

Extract Usernames from Emails Seamlessly in WPS Spreadsheet

WPS Spreadsheet provides powerful text functions and intelligent data processing tools. You can effortlessly remove domains from hundreds of emails using formulas or the built-in Flash Fill tool, streamlining your data cleanup.

  1. 1. Open your dataset: Launch WPS Spreadsheet and open the document containing your email list.
  2. 2. Select an output cell: Click on the blank cell immediately to the right of your first email address entry.
  3. 3. Apply the extraction method: Type the formula =TEXTBEFORE(A2, "@") and press Enter, or manually type the target username and press Ctrl + E to activate Flash Fill.
  4. 4. Fill the column: Drag the fill handle down to the bottom of your list to apply the extraction to all rows instantly.
100% compatibility with Microsoft Excel text functions and formulas.Intelligent Flash Fill feature to automate repetitive data extraction.Lightweight application that smoothly handles massive datasets without lagging.Free to use with a highly familiar interface, ensuring zero learning curve.
microsoft office alternative - wps office

Frequently Asked Questions

What if my version of Excel doesn't support the TEXTBEFORE function?

If you are using an older version of Excel, TEXTBEFORE might not be available. You can achieve the exact same result by combining the LEFT and FIND functions. Enter the formula =LEFT(A2, FIND("@", A2)-1) in the adjacent cell.

Can I remove the domains entirely without creating a new column?

Yes, using the Find and Replace feature. Select your column of email addresses, press Ctrl + H to open the Find and Replace dialog. In the 'Find what' box, type @* (the @ symbol followed by an asterisk). Leave the 'Replace with' box completely blank, and click 'Replace All'.

How do I separate the username and domain into two different columns?

Highlight your column of email addresses, go to the Data tab, and click 'Text to Columns'. Choose 'Delimited' and click Next. Check the 'Other' box, type the @ symbol in the text box next to it, and click Finish. This will split the data at the @ symbol into two adjacent columns.