+ Reply to Thread
Results 1 to 11 of 11

Date not sorting properly

  1. #1
    Forum Contributor
    Join Date
    10-22-2014
    Location
    Ontario
    MS-Off Ver
    365
    Posts
    222

    Date not sorting properly

    I tire of this issue and so once and for all I am hoping someone can help me so that I don't have to always have to have this happen.

    The first column has dates which are showing formatted at Date, 14-03-2012 as according to Excel formats offered. Instead of dashes - my list uses / between values which I assume is not a problem.

    All of the data was pulled from the same source and so the date formatting should be right and yet when I filter according to date it doesn't work properly. I have tried "text to columns" before but I can never seem to get this to work as it should. It baffels my mind how this is still a thing in Excel which to me, should be a fairly basic feature that people want to use and yet MS has not properly addressed.

    If someone could help me from inflicting any further personal harm due to prolonged frustration I would be more than grateful.

    Thank you.

    Peter
    Attached Files Attached Files

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Date not sorting properly

    did you forget to turn on the DMY option in text2columns?
    Attached Files Attached Files

  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 2403
    Posts
    44,063

    Re: Date not sorting properly

    The "dates" are text that look like dates.

    Select column A. Data/Text to columns/Next/Next/Date... DMY/Finish

    Format the cells as desired. Here they are formatted as long dates.
    Attached Files Attached Files
    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.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Date not sorting properly

    Despite looking like dates, that is a list of text values. You can tell by the fact they are left aligned and changing the format from Date to General makes no difference.

    You can use Text to Columns to convert them to true dates. Or use a Helper column and add 0 to each value.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Copy and Paste Special | Values over the original cells.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Forum Contributor
    Join Date
    10-22-2014
    Location
    Ontario
    MS-Off Ver
    365
    Posts
    222

    Re: Date not sorting properly

    Hi Sandy. Well, I have done that before but it must be that I am not doing it properly.
    Text to Cols, Delimited
    Tab selected, Text qualifier *
    Finish.
    This isn't working. Not sure what all these things mean "text qualifier".
    Peter

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Date not sorting properly

    There is a date option on the second page (I think). Select DMY for UK style dates.

    Glenn detailed how to do it correctly. Or go with the formula approach.

  7. #7
    Forum Contributor
    Join Date
    10-22-2014
    Location
    Ontario
    MS-Off Ver
    365
    Posts
    222

    Re: Date not sorting properly

    I am seeing a problem in my work. The dates are filtering correctly until a point where the date date changes from mm-dd-year to mm/dd/year. I downloaded everything from the same source so not sure why some dates have a hyphen and some a slash. I am thinking this can also be corrected using "text to cols".
    Again, for professionals these things are simple but for the average guy MS should simplify the whole things.

    Peter

  8. #8
    Forum Contributor
    Join Date
    10-22-2014
    Location
    Ontario
    MS-Off Ver
    365
    Posts
    222

    Re: Date not sorting properly

    I went back to the start and notice that when I did the "text to col" the end result shifted some dates to left or right alignment with left alignment showing dashes and right alignement showing hyphens. Ugh!
    Peter

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

    Re: Date not sorting properly

    Sample file please... small... but with BOTH formats and with DAYS >12

  10. #10
    Forum Contributor
    Join Date
    10-22-2014
    Location
    Ontario
    MS-Off Ver
    365
    Posts
    222

    Re: Date not sorting properly

    Oh boy! I realized I was choosing MDY instead of DMY. Such a silly mistake.

    I think it works. Thanks you all for your help on solving this for me.

    Peter

  11. #11
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Date not sorting properly

    You're welcome. If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. Data is not sorting properly
    By DeJans1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-04-2023, 09:58 AM
  2. [SOLVED] Date not sorting properly (or weirdly)
    By Waverly in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 07-16-2022, 12:08 AM
  3. [SOLVED] Sorting not working properly
    By EC37 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-30-2015, 04:08 PM
  4. Not sorting dates properly
    By lstar in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-07-2015, 04:06 PM
  5. Sorting "" properly for date formatted column
    By TheGunslinger in forum Excel General
    Replies: 6
    Last Post: 05-06-2015, 06:06 PM
  6. [SOLVED] VBA Not Sorting Properly
    By phelbin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-07-2015, 12:56 PM
  7. Report not sorting properly
    By nzkazza in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-29-2012, 10:46 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