Excel sorting

Copper Contributor

I have a column of e-mail addresses currently sorted by first name in the address.  How do I sort that column by the first letter of the name that appears after the @ sign [i.e., by company name]?

4 Replies

@Gellison -

 

You could accomplish with a helper column. Then Data -> Sort window.

3.PNG

 

 

Can you help me fix my formula?

=MID(A2,SEARCH("@",[@email],1),LEN(A2))

A2 has the first email address a.wilkens@ducommun.com That column header is email

@Gellison -

 

What is wrong with your formula? Seems to work for me.

@Gellison You can use flash fill to extract the domain name in an adjacent column, then use that to sort by. To do this, assuming your email addresses are in column A (can be wherever), in column B you'd just type out the entire domain name. Excel will recognize this. Go to the next cell and start typing the domain name. As soon as Excel recognizes the pattern, it will fill in the range with light gray text of all matching records. When it looks good, confirm with ENTER.

 

The above is opposed to entering a formula manually. In which case I'd use a formula like:

=RIGHT(A1,LEN(A1)-FIND("@",A1))