+ Reply to Thread
Results 1 to 8 of 8

data sorting dates

  1. #1
    Registered User
    Join Date
    02-02-2007
    Posts
    5

    data sorting dates

    Can anybody help with a data sort query. I have a list of dates (obtained froma Sage) in format dd/mm/yyyy. I need to sort them in date order but NOT INCLUDING THE YEAR. I have tried formatting to remove year but it wont change. I have about 1000 dates on the list.

  2. #2
    Registered User
    Join Date
    07-28-2005
    Posts
    73
    I do not understand the question .

    If you want to remove the year then in what way will you sort.. suppose if there are two data with same month and date , then how will you sort it ?

    However, i tried to copy the value of A1:A34- dateswith dd/mm/yyyy format to C1:C34 , then i used format and set it to dd/mm , then i sorted it ... it sorted it asc and desc..
    maybe iam understanding it wrong, let me know

  3. #3
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    You will not be able to sort the data you have the way you would like to. You will first have to convert it to text, using:

    =TEXT(A1,"mm/dd")

    Copy that formula down, select past special > values, then sort. The above will allow you to sort by month then day, so if you want to sort by actual day (regardless of the month), then use "dd/mm", rather than "mm/dd".

  4. #4
    Registered User
    Join Date
    02-02-2007
    Posts
    5

    further data sort help

    Thanks for the advise, it worked, BUT, when I sort the dates they are sorting by month and all the 31st of the different months first followed by 1st of months etc etc.

    I need the list to sort all the 1st Jan, followed by 2nd Jan through to 31st December. Can you help?

    Many thanks
    Carol

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,727
    Hello Carol, it works OK for me. If you get a "sort warning" choose "sort numbers and numbers stored as text separately"

  6. #6
    Registered User
    Join Date
    02-02-2007
    Posts
    5

    data sort

    I have tried that but it still lumps all the dates together opposed to sorting in dates and month!

  7. #7
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,727
    Don't know why that wouldn't work. Another option....

    use this formula in a helper column, e.g. column B

    =DATE(0,MONTH(A1),DAY(A1))

    copied down

    Select the data in both columns and sort by column B ascending

  8. #8
    Registered User
    Join Date
    02-02-2007
    Posts
    5

    Smile data sort

    Daddylonglegs, YOU ARE A STAR. It worked
    Many thanks saved me masses of time

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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