+ Reply to Thread
Results 1 to 5 of 5

Copying Filtered Data From 2 Sheets of One Workbook to Another Isn't Working Correctly

  1. #1
    Forum Contributor
    Join Date
    08-04-2010
    Location
    Adelaide, Australia
    MS-Off Ver
    Office 365
    Posts
    176

    Copying Filtered Data From 2 Sheets of One Workbook to Another Isn't Working Correctly

    Hi all,

    this is the code that copies filtered data from on worksheet in a workbook to another sheet in another workbook (I have attached both dummy workbooks)
    Please Login or Register  to view this content.
    This part works fine - now here is the second piece of code which, while similar, should copy different filtered data from a different worksheet to another worksheet in the report. It doesn't. When I run this code it just seems to copy the data from the first code all over again and I can't see why.
    Please Login or Register  to view this content.
    Can anyone spot what I'm doing wrong? My plan was to have just the one piece of code to do both but I'm stuck with being able to combine the two if I can't get them to run properly on their own.

    Any help would be most appreciated.

    Cheers,

    AJ
    Attached Files Attached Files
    Last edited by ScotyB; 11-13-2012 at 06:31 PM. Reason: To mark as SOLVED
    Always grateful for the help here - thanks.

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Copying Filtered Data From 2 Sheets of One Workbook to Another Isn't Working Correctly

    I really want to help you, but I don't know what I am looking at. Easier to troubleshoot if you point out which line gives the error.

  3. #3
    Forum Contributor
    Join Date
    08-04-2010
    Location
    Adelaide, Australia
    MS-Off Ver
    Office 365
    Posts
    176

    Re: Copying Filtered Data From 2 Sheets of One Workbook to Another Isn't Working Correctly

    Hi JieJenn,

    I don't get any errors come up, per se - if you go to the front page sheet of the dummy data workbook and click on the "Copy attendance data to report" button, this works fine, as per the first snippet of code - if you then click on the "Copy evaluation data to report" button, instead of copying that data I want to the sheet I want, it just seems to recopy the first lot of data.
    So, the first will filter and copy the correct data from the "attendances' sheet of the dummy data workbook to the "transattend" sheet of the dummy report - this bit works as I want it to.
    When pressing the second button it is supposed to copy the filtered data from the "evaluations" sheet of the dummy data workbook to the "transeval sheet of the dummy report workbook but instead, it copies the same as the first (attendances in data to transattend in report) and that's the part I can't get my head around.

    Cheers, and thanks for taking a look,

    AJ

    PS - both workbooks need to be open...

    PSS - just select a start and finish date from the userform that pops up and select the "GO" button...
    Last edited by ScotyB; 11-09-2012 at 07:47 PM. Reason: add extra info

  4. #4
    Forum Contributor
    Join Date
    08-04-2010
    Location
    Adelaide, Australia
    MS-Off Ver
    Office 365
    Posts
    176

    Re: Copying Filtered Data From 2 Sheets of One Workbook to Another Isn't Working Correctly

    Any ideas yet, JieJenn? I double-checked to make sure that I also had the right piece of code assigned to the right button (I would have felt foolish if THAT were the reason, lol) but I still can't figure anything out yet...

    Cheers,

    AJ

  5. #5
    Forum Contributor
    Join Date
    08-04-2010
    Location
    Adelaide, Australia
    MS-Off Ver
    Office 365
    Posts
    176

    Re: Copying Filtered Data From 2 Sheets of One Workbook to Another Isn't Working Correctly

    Sigh - as it turns out, assigning the wrong userform was the problem, something I discovered this morning. One part of me is happy that my code worked correctly and the other part of me is embarrassed at missing something so simple. Ah well, live and learn, lol.

    Cheers,

    AJ

+ 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