+ Reply to Thread
Results 1 to 4 of 4

Sorting values within cell alphabetically

  1. #1
    Registered User
    Join Date
    07-16-2019
    Location
    New Zealand
    MS-Off Ver
    365
    Posts
    44

    Sorting values within cell alphabetically

    Hi Excel Forum,

    I have a column of cells with months that are out of order.

    E.g: "January October November December March April May February June July August September"

    Does anyone know of a quick way to sort these by month?

    I found this user defined function which sorts by number:

    Please Login or Register  to view this content.
    https://superuser.com/questions/7051...-cell-in-excel

    Many Thanks

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,962

    Re: Sorting values within cell alphabetically

    How about this, for a list of months in A2:

    =LET(v,TEXTSPLIT(A2," "),d,DATEVALUE(v & " 1, 2023"),s,SORT(TRANSPOSE(d),1),TEXTJOIN(" ",FALSE,TEXT(TRANSPOSE(s),"mmmm")))

    You can then copy the formulas and paste values over the original cells.

    Ooops - sorry. Getting too used to everyone having 365....

    Change your function to this:

    Please Login or Register  to view this content.
    Last edited by Bernie Deitrick; 01-19-2023 at 04:40 PM.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,584

    Re: Sorting values within cell alphabetically

    try
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    07-16-2019
    Location
    New Zealand
    MS-Off Ver
    365
    Posts
    44

    Re: Sorting values within cell alphabetically

    Thank you very much Bernie and Jindon! Both of these responses work perfectly

+ 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. Sorting Data Alphabetically In One Cell Using VBA - Not Removing Spaces
    By thechrissamsa in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-17-2021, 01:14 PM
  2. Replies: 0
    Last Post: 01-17-2021, 12:39 PM
  3. [SOLVED] Sorting data alphabetically in one cell by surname
    By Jasper1 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-14-2020, 04:30 AM
  4. Sorting a list alphabetically keeping duplicates+ lookup some values
    By buyshirts in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-24-2015, 04:38 AM
  5. [SOLVED] Return column heading of top 5 values, sorting alphabetically if there's a tie
    By abullock in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-16-2013, 02:07 AM
  6. Help in Sorting Unknown Cell Range Alphabetically
    By crisshinn in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-21-2011, 07:01 AM
  7. [SOLVED] Sorting data in a cell alphabetically
    By Newbie1092 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-28-2005, 01:55 PM

Tags for this Thread

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