Home

Excel sorting

%3CLINGO-SUB%20id%3D%22lingo-sub-672387%22%20slang%3D%22en-US%22%3EExcel%20sorting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-672387%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20column%20of%20e-mail%20addresses%20currently%20sorted%20by%20first%20name%20in%20the%20address.%26nbsp%3B%20How%20do%20I%20sort%20that%20column%20by%20the%20first%20letter%20of%20the%20name%20that%20appears%20after%20the%26nbsp%3B%40%20sign%20%5Bi.e.%2C%20by%20company%20name%5D%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-672387%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-672397%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20sorting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-672397%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F355440%22%20target%3D%22_blank%22%3E%40Gellison%3C%2FA%3E%26nbsp%3B-%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20could%20accomplish%20with%20a%20helper%20column.%20Then%20Data%20-%26gt%3B%20Sort%20window.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20471px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F117285iACD2DE8B3B7BEFA4%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%223.PNG%22%20title%3D%223.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-675714%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20sorting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-675714%22%20slang%3D%22en-US%22%3ECan%20you%20help%20me%20fix%20my%20formula%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%3DMID(A2%2CSEARCH(%22%40%22%2C%5B%40email%5D%2C1)%2CLEN(A2))%3CBR%20%2F%3E%3CBR%20%2F%3EA2%20has%20the%20first%20email%20address%20a.wilkens%40ducommun.com%20That%20column%20header%20is%20email%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-675770%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20sorting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-675770%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F355440%22%20target%3D%22_blank%22%3E%40Gellison%3C%2FA%3E%26nbsp%3B-%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20is%20wrong%20with%20your%20formula%3F%20Seems%20to%20work%20for%20me.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-675856%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20sorting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-675856%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F355440%22%20target%3D%22_blank%22%3E%40Gellison%3C%2FA%3E%26nbsp%3BYou%20can%20use%20flash%20fill%20to%20extract%20the%20domain%20name%20in%20an%20adjacent%20column%2C%20then%20use%20that%20to%20sort%20by.%20To%20do%20this%2C%20assuming%20your%20email%20addresses%20are%20in%20column%20A%20(can%20be%20wherever)%2C%20in%20column%20B%20you'd%20just%20type%20out%20the%20entire%20domain%20name.%20Excel%20will%20recognize%20this.%20Go%20to%20the%20next%20cell%20and%20start%20typing%20the%20domain%20name.%20As%20soon%20as%20Excel%20recognizes%20the%20pattern%2C%20it%20will%20fill%20in%20the%20range%20with%20light%20gray%20text%20of%20all%20matching%20records.%20When%20it%20looks%20good%2C%20confirm%20with%20ENTER.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20above%20is%20opposed%20to%20entering%20a%20formula%20manually.%20In%20which%20case%20I'd%20use%20a%20formula%20like%3A%3C%2FP%3E%3CP%3E%3DRIGHT(A1%2CLEN(A1)-FIND(%22%40%22%2CA1))%3C%2FP%3E%3C%2FLINGO-BODY%3E
Gellison
New 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))

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
38 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies