+ Reply to Thread
Results 1 to 6 of 6

Sorting Dates

  1. #1
    Forum Contributor
    Join Date
    09-29-2014
    Location
    Montreal, Canada
    MS-Off Ver
    2013
    Posts
    222

    Sorting Dates

    In my workbook sheets I have a date column and on my UserForm I have a txtBox which picks the date from the date column. I want to sort the date column in descending order (current year first) but it does not work, dates are mixed and I think the date format may be the problem

    I prefer my dates in this format Jul-10-15 but the format cells date does not have this format available (Excel 2013). Is there another way to force Excel to accept the format I prefer?

    If I want to have the date column sorted in descending order and have the current year and then the months in order do I need to have the date like 15-Jul-10 or I can have it like Jul-10-15 and it will get the 15 at the top?

  2. #2
    Forum Contributor
    Join Date
    10-13-2012
    Location
    Southern California
    MS-Off Ver
    Excel 2007
    Posts
    401

    Re: Sorting Dates

    As far as formatting is concerned, try this as a custom format: rmmm-dd-yy. That should give you Jul-10-15.

    Whatever your format is, as long as Excel knows it's a date, sorting in descending order should work. Recall that the date is just a number... the number of days since 1/1/1900, if I remember.

  3. #3
    Forum Contributor
    Join Date
    09-29-2014
    Location
    Montreal, Canada
    MS-Off Ver
    2013
    Posts
    222

    Re: Sorting Dates

    Thanks Ed, I will give it a try

  4. #4
    Forum Contributor
    Join Date
    09-29-2014
    Location
    Montreal, Canada
    MS-Off Ver
    2013
    Posts
    222

    Re: Sorting Dates

    It works well Ed but the dates now appear like rJul-11-15. Is there a way to get rid of the (r) ?

  5. #5
    Forum Contributor
    Join Date
    10-13-2012
    Location
    Southern California
    MS-Off Ver
    Excel 2007
    Posts
    401

    Re: Sorting Dates

    I'm so sorry. That's a typo on my part. That r doesn't belong. Try just this: mmm-dd-yy

  6. #6
    Forum Contributor
    Join Date
    09-29-2014
    Location
    Montreal, Canada
    MS-Off Ver
    2013
    Posts
    222

    Re: Sorting Dates

    No problem Ed, all is fine now, thanks

+ 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. [SOLVED] Sorting Dates
    By skate1991 in forum Excel General
    Replies: 5
    Last Post: 09-15-2012, 08:11 PM
  2. sorting dates - help
    By Deanomcbeano in forum Excel General
    Replies: 5
    Last Post: 12-07-2010, 08:18 AM
  3. Sorting by dates
    By DGillham in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-23-2007, 04:39 PM
  4. [SOLVED] Sorting dates:How do I sort a column filled with dates by Month, Day, then Year?
    By Heather in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-22-2005, 10:05 PM

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