Results 1 to 6 of 6

Macro to search and copy rows based on date/time and Team.

Threaded View

  1. #1
    Registered User
    Join Date
    08-07-2009
    Location
    Honolulu, HI
    MS-Off Ver
    Excel 2003
    Posts
    16

    Macro to search and copy rows based on date/time and Team.

    Hi, I have a tough one for you guys. I have a spreadsheet that has data submissions from field agents. These submissions are made using a web front end and basically have a large amount of submissions from various dates and teams that i'd like to parse using a macro.

    Basically the macro works like this.

    It reads the start and end dates of two fields. It searches Column A for any match that falls within that criteria then subjects that row to further analysis.

    If Column C matches any of the search terms I have requested, the entire row gets copied from Sheet1 to Sheet3

    A text example for those who do not wish to view the sheet would be like this.

    Sheet1 contains raw data
    ...............A.............................B............................
    1.......11/1/11 14:30.............1PM
    2.......11/1/11 08:21.............2PM
    3.......11/2/11 04:00.............3AM
    4.......11/2/11 08:00.............1AM

    On Sheet2
    I'd like to have a Start<->End date criteria. It's only a date search for please note my A column is date / time but 11/1/1 would mean 11/1/11 00:00 -> 11/1/11 23:59 as an example.

    I have another set of fields that say 1AM, 2AM, 3AM, 4AM, 1PM and so forth. These are switches based on 0 or 1.

    If the Start Date was 11/1/11 End Date was 11/2/11
    And the switches were 1AM->5AM all on, 1PM-5PM all on then every row in that table above would be copied from Sheet1 to Sheet3

    If Start Date was 11/1/11 End Date was 11/2/11
    And the switches were 1AM on, 1PM on, rest off, then rows 1 and 3 would be copied from Sheet1 to Sheet3.

    I hope this best describes my goal.

    Thank you very much, look forward to seeing how this can be worked out.

    If searching for a result within a result is too much to ask, a simple copy all rows based on date would be fine and I can sort and pick out each section from there.
    Attached Files Attached Files

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