+ Reply to Thread
Results 1 to 8 of 8

Sorting the order of the items in an Excel AutoFilter

  1. #1
    Forum Contributor
    Join Date
    08-04-2013
    Location
    Bucharest
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    303

    Sorting the order of the items in an Excel AutoFilter

    months.png

    Hello. In the picture above, the column A is populated with a list of the months of the year, in chronological order. Is there any way to change the order in which the months are displayed when you click the autofilter? As it is, they are displayed in alphabetical order and I would like them to be displayed in chronological order: January - December.

    I'm refering only to the order in which the items are displayed when the autofilter is clicked, and not the order of the values of the cells on the column.

    Thanks in advance for your help.
    Last edited by bibu; 05-19-2023 at 09:13 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    06-23-2021
    Location
    Romania
    MS-Off Ver
    2021, 365 v 2208
    Posts
    722

    Re: Sorting the order of the items in an Excel AutoFilter

    Hi,
    In Autofilter , on text columns the order of items is alphabetical and you can't change it. The chronological order of months appear on date columns.
    Diana Tanase


    If the solutions offered helped you to solve your problem, then mark the thread as SOLVED (thread tools in the top menu) and you can click on * to add reputation to those who helped you, as a way to say thank you !

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,393

    Re: Sorting the order of the items in an Excel AutoFilter

    Sort/Custom Sort If it's not already present, then create a new custom list as shown by the box instructions
    Attached Images Attached Images
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,808

    Re: Sorting the order of the items in an Excel AutoFilter

    a list of the months of the year, in chronological order
    They are chronological in your head, but they are just a list of words to Excel, so it sorts in alphabetical order. Note that it says "Sort A to Z".

    Instead of typing in text for each month, use date values

    (EU format dates)
    1/1/2023
    1/2/2023
    1/3/2023

    etc.

    Then using Custom Format Mmmm

    You will see the same thing in the cells, but now you can sort it. Now it will say "Sort oldest to newest"

    If this does not help please attach a sample file with your data.
    Attached Files Attached Files
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  5. #5
    Valued Forum Contributor
    Join Date
    06-23-2021
    Location
    Romania
    MS-Off Ver
    2021, 365 v 2208
    Posts
    722

    Re: Sorting the order of the items in an Excel AutoFilter

    @Glenn
    I'm afraid that the OP want to see in Autofilter menu the months name in chronological order and I'm pretty sure that this is not possible.

  6. #6
    Forum Contributor
    Join Date
    08-04-2013
    Location
    Bucharest
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    303

    Re: Sorting the order of the items in an Excel AutoFilter

    Thank you all for your input. It helped me find the workaround. I simply populated the Month column with the dates from January 1st to December 31st, and then used a custom format:

    months2.png

    Now the months are displayed in chronological order, within the AutoFilter. TY

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,393

    Re: Sorting the order of the items in an Excel AutoFilter

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please click on "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.

  8. #8
    Forum Contributor
    Join Date
    08-04-2013
    Location
    Bucharest
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    303

    Re: Sorting the order of the items in an Excel AutoFilter

    Correction: for the Months I used the same solution that @6stringjazzer offered. The workaround that I was referring to, was for the days of the week column.
    Which was this:
    =WEEKDAY(A1; 2)&"-"&CHOOSE(WEEKDAY(A1; 1); "Dimanche"; "Lundi"; "Mardi"; "Mercredi"; "Jeudi"; "Vendredi"; "Samedi")

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Loop through AutoFilter Items and Select/Deselect Desired Items
    By dluhut in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-02-2023, 12:51 PM
  2. [SOLVED] How to keep items in ListBox in alphabetical order when removing and adding items to box
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-31-2015, 07:13 AM
  3. macro to filter all items in Autofilter except 2+ items
    By DanRiverBrew in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-09-2013, 09:15 PM
  4. Sort autofilter list items in descending order
    By winshent in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-13-2008, 05:28 AM
  5. Capturing the Excel AutoFilter Sorting Event-sort and autofilter options
    By Kognyto in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-11-2008, 05:36 PM
  6. Capturing the Excel AutoFilter Sorting Event
    By Piyush Kumar in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-04-2007, 03:14 AM
  7. how do i put items on an excel chart in ABC order?
    By ~*!nAyRa!*~ in forum Excel General
    Replies: 1
    Last Post: 05-08-2006, 11:40 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1