+ Reply to Thread
Results 1 to 4 of 4

Can't sort time data for values ending in '0'

  1. #1
    Registered User
    Join Date
    11-28-2011
    Location
    Osaka, Japan
    MS-Off Ver
    Excel 2011 (OS X)
    Posts
    2

    Can't sort time data for values ending in '0'

    Hi,

    I am new to the forum (first post) so apologies if I break convention or don't post as is expected, (I have read the forum rules).

    I have some simple data that I am trying to sort by time (see attached file - note I have cut out most of the data to stay within the attachment limit - it is much larger than this in reality down to more than row 200,000).

    Basically there are six columns listing financial price data. Column 1 is the date, column 2 is the time, and columns 3-6 are the financial instrument prices. Each column represents one minute, so it looks like the screen shot below.

    The data continues over 200,000 rows.

    I only need the prices that occur every ten minutes, E.g. the prices at 00:00, then 00:10, then 00:20, then 00:30 etc etc all through the day. (Almost every 10th column, but not always because some data is not-contiguous). I.e. I need only the columns in which the time cell ends in a zero. How would I go about sorting the table to give me only these cells?

    If the data was completely contiguous I could just sort every tenth column, but unfortunately there are many instances where some minutes the data is not present so this doesn't work. And with more than 200,000 data points impossible to do manually!

    Any suggestions would be greatly appreciated.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    10-13-2010
    Location
    Sunderland, England
    MS-Off Ver
    Excel 2007 (Home) / 2003 (Work)
    Posts
    740

    Re: Can't sort time data for values ending in '0'

    You could use a helper column with the following formula in:
    =IF(RIGHT(TEXT(B2,"hh:mm"),1)=TEXT(0,"general"),"x","")
    then filter out the Xs?

    Hope this helps.

  3. #3
    Registered User
    Join Date
    11-28-2011
    Location
    Osaka, Japan
    MS-Off Ver
    Excel 2011 (OS X)
    Posts
    2

    Talking Re: Can't sort time data for values ending in '0'

    Quote Originally Posted by brokenbiscuits View Post
    You could use a helper column with the following formula in:
    =IF(RIGHT(TEXT(B2,"hh:mm"),1)=TEXT(0,"general"),"x","")
    then filter out the Xs?

    Hope this helps.
    Wow that totally worked! Thank you so much, that really helped me out. I had no idea how to do that, and to be honest, other than the IF function, I have never seen the RIGHT or TEXT functions before. I will go away and read what they do to see how you did it.

    Thanks again brokenbiscuits!

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Can't sort time data for values ending in '0'

    Or, in G2 and copy down,

    =B2=MROUND(B2, "0:10")
    Last edited by shg; 11-28-2011 at 01:45 PM.
    Entia non sunt multiplicanda sine necessitate

+ 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