+ Reply to Thread
Results 1 to 7 of 7

Keep only 7am to 7pm data from 24hr monthly dump - 170k rows!

  1. #1
    Registered User
    Join Date
    09-17-2012
    Location
    South Wales, UK
    MS-Off Ver
    Excel 2003
    Posts
    51

    Keep only 7am to 7pm data from 24hr monthly dump - 170k rows!

    Hi guys,

    I have a strange one for you here, if anyone fancies helping me, please?

    I have a 24 hour dump of data for the entire month but only require what is in the 7am to 7pm window. It's 170+ thousand rows!

    What is the best way to do this?

    Many thanks,
    David.

    (I've had to cut it down to two days, because the file was way too big)
    Test Data3.xlsx
    Last edited by essee; 02-23-2015 at 07:31 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,852

    Re: Keep only 7am to 7pm data from 24hr monthly dump - 170k rows!

    You could put a formula like this in I2:

    =IF(OR(MOD(B2,1)<--"07:00:00",MOD(B2,1)>--"19:00:00"),"remove","ok")

    then copy it down by double-clicking the fill handle. Then apply autofilter to that column and select "remove". Highlight all the visible rows and click the <delete> icon. Then remove autofilter from column I, and delete column I.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    09-17-2012
    Location
    South Wales, UK
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Keep only 7am to 7pm data from 24hr monthly dump - 170k rows!

    Hi Pete,

    Thanks for the speedy response. I was hoping for something with a few less steps, but that seems to work just fine. Beggars can't be choosers, I guess.

    Much appreciated.

  4. #4
    Registered User
    Join Date
    09-17-2012
    Location
    South Wales, UK
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Keep only 7am to 7pm data from 24hr monthly dump - 170k rows!

    It's just occurred to me, I need to remove the weekends too! Damn.

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,852

    Re: Keep only 7am to 7pm data from 24hr monthly dump - 170k rows!

    Okay, change the formula to this in I2:

    =IF(OR(WEEKDAY(INT(B2),2)>5,MOD(B2,1)<--"07:00:00",MOD(B2,1)>--"19:00:00"),"remove","ok")

    Hope this helps.

    Pete

  6. #6
    Registered User
    Join Date
    09-17-2012
    Location
    South Wales, UK
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Keep only 7am to 7pm data from 24hr monthly dump - 170k rows!

    Yes, that's brilliant, thank you!

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,852

    Re: Keep only 7am to 7pm data from 24hr monthly dump - 170k rows!

    Okay, glad to help.

    If that takes care of your original question, please select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Also, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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. [SOLVED] Data Dump and look up
    By isac in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-10-2013, 02:47 PM
  2. VBA or Excel? Need last 10 rows of data. Data grows monthly by a row.
    By welchs101 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-27-2013, 05:47 PM
  3. delete rows outside of 24hr period
    By dmic23 in forum Excel General
    Replies: 1
    Last Post: 07-14-2012, 07:25 PM
  4. Finding data on a dump file, populating rows in a summary file
    By SBells in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-21-2008, 08:29 AM
  5. Data validation using time exceeding 24hr values
    By rgarber1950 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-06-2007, 05:04 PM

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