How to Remove a Domain from Email Addresses in Excel
Question details
The user needs to extract usernames from a list of email addresses by stripping out the domain portion that follows the @ symbol.

- 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.
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.
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.
Click on the first empty cell next to your list of email addresses (for example, cell B2 if your first email is in A2).
Type the formula =TEXTBEFORE(A2, "@") into the cell and press the Enter key. The username should now appear.
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 Flash Fill Feature
Flash Fill recognizes patterns in your data entry and automatically fills the rest of the column, requiring absolutely no formula knowledge.
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. Open your dataset: Launch WPS Spreadsheet and open the document containing your email list.
- 2. Select an output cell: Click on the blank cell immediately to the right of your first email address entry.
- 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. Fill the column: Drag the fill handle down to the bottom of your list to apply the extraction to all rows instantly.

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.




