sorting by email domain

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

I have a long list of email addresses and need to sort
them by the information after the "@" so instead of a list
of
(e-mail address removed)
(e-mail address removed)
(e-mail address removed)

I would come up with

(e-mail address removed)
(e-mail address removed)
(e-mail address removed)

Any advice?
 
Mark,

Here's an option:

Assuming your list of email addresses is in column A,
enter the following in cell B1 and copy it down:

=RIGHT(A1,LEN(A1)-FIND("@",A1))&"/"&LEFT(A1,FIND("@",A1)-1)

This will create another column with the domain first like
this:

microsoft.com/alan
excel.com/betty
office.com/charlie

You can then use this column to sort your addresses.
Plus, by adding the first part of the email address to the
end, it will keep addresses with the same domain name in
alphabetical order as well.

It worked like a charm for me.

Eric
 
Back
Top