Forum Discussion

Molly629's avatar
Molly629
Copper Contributor
Aug 30, 2022

How can I customize Excel's alphabetical sorting methods?

I am an editor and part of my job involves working with long lists of terms and names. We use the Chicago Manual of Style's "letter-by-letter" alphabetization method, which is one of the most common. This method ignores all spaces and punctuation and just sorts based on the next letter of the alphabet. Unfortunately, Excel (and all of Office, I assume) uses a completely different method, which is useless to me. As an example, a term in quotation marks currently gets sorted to the top, above the A terms, but I need it to ignore the opening quote and sort by whatever letter follows it. Also, this may not be part of CMOS but I would like to get terms starting with "The" to ignore that initial "The" and sort by whatever follows it.

 

Adding a bunch of new terms to a spreadsheet one at a time, so I can manually stick them where they go between the existing rows, would take up an enormous amount of time. So, is there a way I can customize the rules for alphabetization? I've heard of custom sort orders, but it seems like those are meant more for short, finite lists and not for general rules. A web search has turned up no useful ideas. If I can't get things to sort properly, I think I might have to find another program because Excel does not sustainably meet my needs without this function. Please let me know if this is something that can be done (and if so, please break down the steps as much as possible because I am not an Excel expert by any means).

 

If this CANNOT be done, is there any way I could paste in a list of new terms at the bottom of a spreadsheet and tell Excel to alphabetize ONLY those new terms into the rest, so I could save time and get most of them into place with minimal cleanup afterward?

 

Thanks in advance for any advice!

4 Replies

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    Molly629 It's a petty that you tagged your question with "Excel for Mac". I thought of a solution in Power Query, which is integrated in the PC version of Excel since 2016. On the Mac, however, you need to join the Insider Beta program to enjoy it.

     

    I have, nevertheless,  attached a file that contains a PQ solution, hoping that you can get your hands a PC or that you can become an Insider on Excel for the Mac.

     

    Based on what you described, I believe the picture below illustrates the issue.

    The blue table is the text you want sorted. The piece in the middle is how Excel sorts it. The green table is sorted via PQ, hoping I understood it correctly.

     

     

     

    • Molly629's avatar
      Molly629
      Copper Contributor
      Thanks so much for the fast response! Yes, I think that's just what I'm looking for... unfortunately I have a macbook from my work and I can't install any third-party software on it (admin password lock). Maybe they will roll out the feature officially one day? 😕 But I will keep this in mind if I ever need it on my personal PC, very good to know!
      • JimGMac's avatar
        JimGMac
        MVP

        Molly629 

         

        Hi again,

        Just to keep you up to date, Mac Excel has full PowerQuery capabilities in the current channel build that you already have IF you are skilled in Microsoft Visual Basic for Applications. Click here for a web search with lots of useful links.
        The object model of Excel for Mac and Windows, as well as the code base is the same regarding PowerQuery. What's currently absent in the general release build on the Mac is the PowerQuery interface. That's what is currently being tested.

        If you receive a workbook having a PowerQuery you can currently refresh the data in the Mac Excel interface, but not much else. But if you know VBA, you can use all PowerQuery functionality right now because Mac Excel has VBA (and you can also use AppleScript or Objective-C if you prefer).

         

Resources