Sometimes sorting your email list by domain name can help you easily manage and identify contacts from the same organization or email provider. If you want to sort a list of email addresses first by domain name and then by the first name or email address, Excel’s Flash Fill and sorting features can make this task quick and easy.
Table of contents
YouTube : Sort email addresses by domain name in Excel
Extracting domain names using Flash Fill.
Start with your list of email addresses in Excel. The goal is to split out the domain names from the email addresses.
In the adjacent column (next to your list), type the domain name of the first email address manually. For example, if your email address is ” a.gaither@tresstrong.com”, type ” tresstrong.com”. Ensure that the format matches the email address exactly. Go to the Data tab on the Excel ribbon and click on Flash Fill. You can also use the shortcut Ctrl + E.
Excel will automatically extract the domain names for all email addresses in the list.
Sorting the list by domain name and email address.
Now that you have a separate column with the domain names, you can sort the list by these domains. Highlight the entire list of email addresses along with the extracted domain names. Go to the Data tab and click on Sort. In the sort dialog box, choose to sort by the column with the domain names, from A to Z. Click on Add Level to add a secondary sort criterion. Choose to sort by the email addresses or the first names, depending on how your data is structured. Click OK to apply the sort
You will now have the domain name sorted with the attached email addresses.
Tips and Troubleshooting.
- Consistency in Domain Names: Ensure that the domain names are consistently formatted. For example, “gmail.com” should not appear as “Gmail.com” in some entries. Consistency will help Flash Fill work more effectively.
- Flash Fill Issues: If Flash Fill doesn’t work correctly, double-check the format of your example. Flash Fill works best when the example provided is clear and directly adjacent to the column of data you want to split.
- Sorting Options: When adding a level in the sorting dialog, make sure you are selecting the correct columns to avoid misalignment of your data.
By following these steps, you can efficiently sort your email list by domain name and then by first name or email address.