+ Reply to Thread
Results 1 to 3 of 3

Sort data based on date

  1. #1
    Registered User
    Join Date
    11-04-2010
    Location
    Denmark
    MS-Off Ver
    Excel 2007
    Posts
    12

    Sort data based on date

    Hi

    I have a lot of data that I need to sort depending on the date.

    I have daily observations for ten years on stock prices for 5 different stocks. The problem is that since the stocks are traded in different countires, the dates doesn't always match because of the different holydays etc. This means that some 95% of the dates are identical, but some are different. Because of this, the values for the stocks on ex. date 2 aren't in the same row.

    The data I have is like this (the letter values continues, just didn't bother to put them in )

    __Obs 1_________Obs 2__________Obs 3 .........................................
    Date__Value...... Date__Value.....Date___Value
    1...........a.............2.........b............1..........a
    2...........b.............3.........c............2..........b
    4...........d.............4.........d............4..........d
    5..........................5.......................6
    6..........................7.......................7
    8...................................................8

    What I need is a way to sort the date so it looks something like this so it is possible to compare the date based on the dates. (the value a,b,c,... shouldn't be sorted and are not alike, it is just to illustrate.)


    ...Obs 1.................Obs 2................Obs 3
    Date__Value......Date__Value.......Date__Value
    1...........a......................................1..........a
    2...........b.............2.........c............2..........b
    4...........d.............4.........d............4..........d
    5...........e.............5.........e..........................
    6...................................................6...........
    ............................7........g.............7..........g
    8...........h......................................8..........h

    I hope it makes sence and that someone has a great solution

    Thank you in advance!

    Kind regards
    Thomas
    Last edited by viuf81; 02-05-2011 at 07:58 PM.

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Sort data based on date

    Hi viuf81

    Sorting and/or Filtering on Dates is squirrelly at best. You'll be best served if you post an example workbook that demonstrates what you have and what you'd like it to be. Perhaps one of us can help.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Registered User
    Join Date
    11-04-2010
    Location
    Denmark
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Sort data based on date

    Ok, I've tried to illustrate it in excel instead. Maybe it is more clear then. I read my previous post and I do understand why you didn't think it was clear what I needed

    I hope this helps and that anyone has an idea!

    Thanks...
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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