+ Reply to Thread
Results 1 to 9 of 9

Manage large data. Extract values only on specified dates

  1. #1
    Forum Contributor
    Join Date
    05-09-2013
    Location
    london
    MS-Off Ver
    Excel 2016
    Posts
    107

    Manage large data. Extract values only on specified dates

    Dear all,

    I have a large data of events that happened trough time, with hundreds of line values. I attach here a little sample of the data that I have:

    Please Login or Register  to view this content.
    As you can see this is a hourly time-step data.

    I would like to have a VBA code that could extract certain spaces in time and the correspondent data from Station rows ("B", "C" and "D"). For example, I want a code that could search on the "A" row for all the data in the Winters. The code should then search only for dates from 21-12-2002 to 20-03-2003, then 21-12-2003 to 21-12-2004.... and so on until the end of my "A" row.

    After that search it should copy and paste all the data that is allocated to that date (data from Station 1, Station 2, Station 3) in another worksheet.

    Can someone give me a help over here?

    Thank you

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Manage large data. Extract values only on specified dates

    Sounds like you can achieve what you need with the filters?
    多么想要告诉你 我好喜欢你

  3. #3
    Forum Contributor
    Join Date
    05-09-2013
    Location
    london
    MS-Off Ver
    Excel 2016
    Posts
    107

    Re: Manage large data. Extract values only on specified dates

    Quote Originally Posted by millz View Post
    Sounds like you can achieve what you need with the filters?
    Dear millz, thank you for your reply.

    I already looked under the filters options, but I'm only able to restrict the data to quarters. I really can't (or I do not know how) restrict to certain specific datas like from 21-12 (all years) to 21-03 (all years also).

    Do you know if that's possible to sort out using filters?

    Regards

  4. #4
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Manage large data. Extract values only on specified dates

    Is your date column formatted as date? I just copy-pasted your small sample data in a blank sheet and I am able to filter by year, month, and day.

  5. #5
    Forum Contributor
    Join Date
    05-09-2013
    Location
    london
    MS-Off Ver
    Excel 2016
    Posts
    107

    Re: Manage large data. Extract values only on specified dates

    Quote Originally Posted by millz View Post
    Is your date column formatted as date? I just copy-pasted your small sample data in a blank sheet and I am able to filter by year, month, and day.
    Yes it is. But are you able to filter automatically all data from 21-december to 20-March from all years? Or you have to write the years one by one? for example:

    21-12-2000 to 20-03-2001, 21-12-2001 to 20-03-2002... and so on.

    Can you do this on the filter just to select 21-12-xx to 20-03-xx?

  6. #6
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Manage large data. Extract values only on specified dates

    I see, so you want the same date range over all years. If this is a one-time process, maybe you can just Date filter -> and use Between..., and repeat for each year?

  7. #7
    Forum Contributor
    Join Date
    05-09-2013
    Location
    london
    MS-Off Ver
    Excel 2016
    Posts
    107

    Re: Manage large data. Extract values only on specified dates

    Quote Originally Posted by millz View Post
    I see, so you want the same date range over all years. If this is a one-time process, maybe you can just Date filter -> and use Between..., and repeat for each year?
    Exactly! I want the same range over all years! The problem is that it is not a one-time process.. I have this kind of data for different station locations so I have like 30 Excel files with this kind of data, and some of these Excel files have data from 1950 to 2016.. Thats a lot of Winters... :\

    Regards

  8. #8
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Manage large data. Extract values only on specified dates

    Try this, adjust accordingly if needed.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by millz; 04-12-2016 at 09:54 AM. Reason: adding in Dim i As Long

  9. #9
    Forum Contributor
    Join Date
    05-09-2013
    Location
    london
    MS-Off Ver
    Excel 2016
    Posts
    107

    Re: Manage large data. Extract values only on specified dates

    Dear millz,

    OUTSTANDING!! Thank you so so so so much for the code! I understand it and I can adjust it to my needs!

    Can't thank you enought! I will give you reputation and off course set this thread to solved!

    Regards!

+ 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. Extract data from Large table
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 11-15-2014, 05:35 PM
  2. Trying to extract data from large spreadsheet
    By Caleesie in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-29-2014, 06:46 AM
  3. Manage a large amount of workbooks with CSV imported data
    By Chris_SS in forum Access Tables & Databases
    Replies: 4
    Last Post: 05-22-2014, 07:27 PM
  4. Extract Data From A Large Range Using VBA
    By Paul_SR in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-13-2014, 12:16 PM
  5. [SOLVED] How to manage a large nested if?
    By xdennis in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-25-2013, 10:42 PM
  6. Extract data in large dagtabase
    By firsttobecool in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-09-2012, 03:05 PM
  7. How would you manage these dates?
    By JMF in forum Excel General
    Replies: 2
    Last Post: 03-28-2006, 10:30 AM

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