+ Reply to Thread
Results 1 to 4 of 4

Copying Filtered Data

  1. #1
    Registered User
    Join Date
    11-22-2006
    MS-Off Ver
    365/2016
    Posts
    12

    Question Copying Filtered Data

    Hello all,

    Usually I’m pretty good a figuring out excel problems on my own but the logic on this issue completely stumps me, which probably means there is a very easy solution and I just can't see it. Here is my problem:

    I have two sheets in a workbook. The first sheet contains incident data for any given day of a year. The two columns that play a roll in this formula are “DATE” and “ LOCATION_ID”. There are 9 other columns that contain the text data for that particular incident.

    The second sheet is set up as a report. The pages move from left to right. Each page of this report contains the specific data to its own “LOCATION_ID”. On top of that I need to be able to populate this report between two dates that I manually fill out.

    So for example I have 50 rows of data in sheet 1 that cover a period of 2 weeks at various “LOCATION_ID’s”. I need this data to auto fill into its respective report on sheet 2. The column layout is exactly the same on both sheets. The only difference of course is the report sheet contains a header.

    I am using named ranges with Sdate, Edate, and LOC. Does anybody have any thoughts on how I can accomplish this task?

    Thank you in advance.

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by kmrkmj
    Hello all,

    Usually I’m pretty good a figuring out excel problems on my own but the logic on this issue completely stumps me, which probably means there is a very easy solution and I just can't see it. Here is my problem:

    I have two sheets in a workbook. The first sheet contains incident data for any given day of a year. The two columns that play a roll in this formula are “DATE” and “ LOCATION_ID”. There are 9 other columns that contain the text data for that particular incident.

    The second sheet is set up as a report. The pages move from left to right. Each page of this report contains the specific data to its own “LOCATION_ID”. On top of that I need to be able to populate this report between two dates that I manually fill out.

    So for example I have 50 rows of data in sheet 1 that cover a period of 2 weeks at various “LOCATION_ID’s”. I need this data to auto fill into its respective report on sheet 2. The column layout is exactly the same on both sheets. The only difference of course is the report sheet contains a header.

    I am using named ranges with Sdate, Edate, and LOC. Does anybody have any thoughts on how I can accomplish this task?

    Thank you in advance.
    Hi,

    If you want to do this manually, select the last filtered row, then shift-select the first filtered row, and Copy, Paste (Special = Values ?) to the new location from A2 (allow for header row)

    If you want to VB code this, then record a macro whilst performing the copy, this should give you most of the code.

    hth
    ---
    note, I presume that you have Auto-Filter on the data and have selected the required display.
    Si fractum non sit, noli id reficere.

  3. #3
    Registered User
    Join Date
    11-22-2006
    MS-Off Ver
    365/2016
    Posts
    12

    Vba

    I'm looking to do this through VBA. The copy and paste idea is the method I currently use. I've tried the macro idea. My problem lies with the event trigger. Unfortuately i'm more familar with the Access VBA then Excel and getting this trigger to fire off is proving to be a difficult task.

  4. #4
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by kmrkmj
    I'm looking to do this through VBA. The copy and paste idea is the method I currently use. I've tried the macro idea. My problem lies with the event trigger. Unfortuately i'm more familar with the Access VBA then Excel and getting this trigger to fire off is proving to be a difficult task.
    Hi,

    When do you want to trigger the event? on specified keypress (set as a macro and use CTRL/letter), on change to a cell or range of cells in a Sheet (see Worksheet_Change event) or when the worksheet is recalculated, or opened or closed, or a button is pressed, or a menu item selected etc

    ---

+ 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