+ Reply to Thread
Results 1 to 5 of 5

Sorting hourly data

  1. #1
    Registered User
    Join Date
    09-01-2011
    Location
    Kansas City
    MS-Off Ver
    Excel 2007
    Posts
    3

    Sorting hourly data

    Hello,

    I have a year's worth of hourly weather data that I would like to extract certain dates/hours from. In the attached worksheet column A contains the specific 1,039 hours I would like to filter from the complete 2010 raw data set starting with column L. It's a lot of data and I am going to have to do this more than once, so I certainly don't want to do this manually. I am lost as to how to set up functions or a macro to do this automatically. Can anyone help?

    Thanks!
    Ryan
    Attached Files Attached Files

  2. #2
    Forum Contributor yay_excel's Avatar
    Join Date
    08-12-2011
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    190

    Re: Sorting hourly data

    Hello,

    I did this using a macro. You can see it if you press Alt+F11 and look in Module1.

    Your data is in the second sheet (Sheet1). There are blank lines where the complete list did not include the date you sought.

    Let me know if that's not what you needed.

    K
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    09-01-2011
    Location
    Kansas City
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Sorting hourly data

    Quote Originally Posted by yay_excel View Post
    Hello,

    I did this using a macro. You can see it if you press Alt+F11 and look in Module1.

    Your data is in the second sheet (Sheet1). There are blank lines where the complete list did not include the date you sought.

    Let me know if that's not what you needed.

    K
    That worked great, thank you! How would you modify it so that it fills in the blanks (missing data) with the last available data point?

  4. #4
    Forum Contributor yay_excel's Avatar
    Join Date
    08-12-2011
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    190

    Re: Sorting hourly data

    Replace the code I provided before with this one:
    Please Login or Register  to view this content.
    Place your cursor at any point in the code and press F5. Depending on how fast your computer is it may take awhile. Let me know if that works.

  5. #5
    Registered User
    Join Date
    09-01-2011
    Location
    Kansas City
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Sorting hourly data

    Quote Originally Posted by yay_excel View Post
    Replace the code I provided before with this one:
    Please Login or Register  to view this content.
    Place your cursor at any point in the code and press F5. Depending on how fast your computer is it may take awhile. Let me know if that works.
    That worked great too, thanks again!

+ 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