+ Reply to Thread
Results 1 to 8 of 8

Excel cloumn sorting

  1. #1
    Registered User
    Join Date
    06-04-2015
    Location
    Kalispell, Montana, USA
    MS-Off Ver
    2007
    Posts
    4

    Excel cloumn sorting

    I need to sort a column by date......Year, Month etc. However the former bookkeeper set up the date format different than what I use. I want to know if there is a way to get all the dates into the correct order.. The column has dates like 4/17 and April 2017 and 8/20 and Dec 2019 and 12/20. How do I sort these, there is no way I can go back and change each date.....cutomer list is 8900 customers long

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Excel cloumn sorting

    Hello,

    are these dates really dates? When you format the cells with a different number format, like "General", do they turn into numbers? If not, these are not dates but text. Sorting will not deliver the desired results. You will need to turn them into real dates. This will probably not be easy to automate. It would be good if you could post a data sample. Copy a few hundred rows from just the Date column into a new file. Save that and upload here. Click the "Go Advanced" button at the bottom and then the paper clip icon to attach a file.

    cheers, teylyn

  3. #3
    Registered User
    Join Date
    06-04-2015
    Location
    Kalispell, Montana, USA
    MS-Off Ver
    2007
    Posts
    4

    Re: Excel cloumn sorting

    here ya go........
    Attached Files Attached Files

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Excel cloumn sorting

    Looking at what that file contains, all I can say is - wow, really? lol

    At a quick glance, I can see...
    entries with multiple leading spaces
    entries with no leading spaces
    mm/yyyyy with no day
    mmm/yyyy with no day
    m/ddd with no year
    Season yyy
    plain text entries

    Not 1 of those entries is actually a real date (by excel standards)

    This is going to take some serious cleaning up, just to get it to a usable format
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    06-04-2015
    Location
    Kalispell, Montana, USA
    MS-Off Ver
    2007
    Posts
    4

    Re: Excel cloumn sorting

    The company is a septic cleaning service so the day of the month is not important. The last bookkeeper was with the company for 15 years.....and she was sick alot.....soo they had other people come in and input data hence the mixed up spaces and such.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Excel cloumn sorting

    OK, but what about the dates with no year - and the text entries?

  7. #7
    Registered User
    Join Date
    06-04-2015
    Location
    Kalispell, Montana, USA
    MS-Off Ver
    2007
    Posts
    4

    Re: Excel cloumn sorting

    if it shows 6/17 that means June of 2017.....

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Excel cloumn sorting

    OK, this will get you dates for most of what you have there - I put this in D3 and copied down...
    =IFERROR(DATE(20&MID(B3,FIND("/",B3,1)+1,2),LEFT(B3,FIND("/",B3,1)-1),1),DATEVALUE(B3))

    Look down the list for the ERRORS, and correct the entry in column B if you can...some are simple typos (Oxct 2019... Set 2019 etc)

    Once you havethat sorted out, you can either just keep those formulas there, or copy/paste values to replace the original data and delete the formulas

+ 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. Replies: 0
    Last Post: 07-02-2014, 04:13 PM
  2. how to drag some data in excel cloumn cells
    By meetvivek72 in forum Excel General
    Replies: 1
    Last Post: 08-23-2012, 07:44 AM
  3. Indexing a Row using only 1 cloumn
    By Grock258 in forum Excel General
    Replies: 5
    Last Post: 09-26-2009, 06:50 AM
  4. Sorting a cloumn with dd:mm:hh
    By wifta in forum Excel General
    Replies: 1
    Last Post: 04-11-2006, 11:00 PM
  5. [SOLVED] Find next cloumn
    By L.White in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-15-2005, 02: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