Forum Discussion

GabChis's avatar
GabChis
Copper Contributor
Jan 30, 2024

Sorting in Excel using a Mac and using custom lists

I have created a custom sort list in Excel by going to Preferences > Sort and created a list.  There was an old list there that I didn't need and deleted.

 

My question is: when I go to sort the data and I click on Sort > Custom Sort and under the heading "Order", I click on the options and the drop down menu includes a selection that no longer need. How do I get rid of this?  Does anyone have any idea please?

 

TIA

2 Replies

  • GabChis 

    There are a few ways to remove the unwanted selection from the custom sort list dropdown menu, depending on where the list is stored:

    1. Remove from Excel's Built-in Lists:

    • Open the File menu and navigate to Options > Advanced.
    • Scroll down to the "General" section and click on "Edit Custom Lists...".
    • In the "Edit Custom Lists" dialog box, select the unwanted list and click "Delete."
    • Click "OK" to save the changes.

    2. Remove from Workbook-Specific List:

    • Open the Sort dialog box by clicking Data > Sort.
    • If the unwanted list appears under the "Custom Lists" option, click on it.
    • Click the small arrow next to the "Order" dropdown menu.
    • Select the unwanted list and click "Delete."
    • Click "OK" to save the changes and close the Sort dialog box.

    3. Check VBA Code (if applicable):

    • If you have created the unwanted list using VBA code, review the code and remove the relevant entries for that list.

    4. Use VBA to delete all custom lists (advanced):

    • Caution: This method deletes all custom lists, including built-in lists. Use with caution.
    • In the Visual Basic Editor (VBA), paste the following code and run it:
    VBA
    Sub DeleteAllCustomLists()
    Dim i As Integer
    For i = 1 To Application.CustomListCount
    Application.DeleteCustomList i
    Next i
    End Sub

    This code iterates through all custom lists and deletes them.

    Additional Tips:

    • Make sure you close and reopen Excel after deleting the unwanted list.
    • If you're unsure where the list is stored, try both methods above until the unwanted selection disappears from the dropdown menu.
    • Consider renaming your custom lists to avoid confusion in the future.

    I hope this helps!

    • MP-RB01's avatar
      MP-RB01
      Copper Contributor

      Sir, your response helped me with a problem I was having. But now that I have saved my custom list by clicking "add", and restarting excel, the custom list that I made is still not available as a custom sort option. Do you have any ideas what I can try next to make this appear in the options? After closing and reopening excel the list does still appear in the custom list editor window. But isn't available as an option when custom sorting the data.

Resources