sort in excel using end of email address

K

kj

I need to sort 8300 email addresses by division which is indicated in the
later part of the email. Any idead how I can do this?
 
C

Chip Pearson

Without knowing the exact structure of the email addresses, it is
difficult to answer. However, you can use the MID and/or RIGHT
functions to split apart the email addresses in a new column and
sort by that column.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
T

tiah

hello !

put this in another column, it will retrieve the right part of the
email. then sort that result column

=RIGHT(A1;LEN(A1)-SEARCH("@";A1))
 
A

Ann Scharpf

KJ just had a syntax problem. S/he used semicolons instead of commas. This
formula does what s/he was aiming for:

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

This formula says to take the rightmost X number of characters from cell A1
display it in the cell with the formula. It calculates X by taking the
length of the full string in A1, finding the position number of the "@",
subtracting that number of characters from the string. So take a couple of
addresses:

[email protected]

Length of the string: 21
Position of @: 7
Rightmost # characters: 14 ... which is disney.fla.com

[email protected]

Length of the string: 19
Position of @: 6
Rightmost # characters: 13 ... which is disney.ca.com

For every email address, the formula will grab just the part that follows
the @. If your company's email addresses follow a standard format, with the
division always in the same position within the address, sorting this column
should do what you need.
 
A

Ann Scharpf

OK, so in my reply, I used the wrong reference name. It was tiah's solution
.... not kj's. Sorry for any confusion.
 
Top