Sorting email addresses

  • Thread starter Thread starter novus
  • Start date Start date
N

novus

I have a large spreasheet in which one colum os email addresses. How can I
sort on only the characters after the @ symbol so for instance all the email
addresses @hotmail.com are grouped together, all those @gmail.com are
grouped together etc?

novus
 
I have a large spreasheet in which one colum os email addresses. How can I
sort on only the characters after the @ symbol so for instance all the email
addresses @hotmail.com are grouped together, all those @gmail.com are
grouped together etc?

novus


http://cjoint.com/?cgxFcsNik4

Sub TriEmail()
Columns("B:B").Insert Shift:=xlToRight
For Each c In Range("c2", [C65000].End(xlUp))
c.Offset(0, -1) = Mid(c, InStr(c, "@") + 1
Next c
Range("A2", [C65000].End(xlUp)).Sort , key1:=[B2]
Columns("B:B").Delete
End Sub

JB http://boisgontierj.free.fr
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top