+ Reply to Thread
Results 1 to 11 of 11

Append Data to Bottom When Using Combine & Merge Macro

  1. #1
    Registered User
    Join Date
    08-14-2007
    Posts
    27

    Append Data to Bottom When Using Combine & Merge Macro

    Hello,

    I am using the below code to combine workbooks into a single sheet. The macro works perfectly for combinging the sheets, however, I can only run the code once. If I run the macro a second time, the data from the first run is overwritten. I would like it to be such that you can run the macro over and over again, and each set of new data will be appended to the next empty row. Unfortunately, I just haven't been able to get this to work. Any help is appreciated. Thanks!

    A Sample of the destination workbook ("Invoice Workbook") and the source data ("TSR Template1-Test1") are in the attached zip.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by wealthistime; 04-21-2011 at 01:51 AM. Reason: SOLVED

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Append Data to Bottom When Using Combine & Merge Macro

    wealthistime,
    with your code you need to move the row counter inside the loop
    Please Login or Register  to view this content.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Registered User
    Join Date
    08-14-2007
    Posts
    27

    Re: Append Data to Bottom When Using Combine & Merge Macro

    Hi Pike,
    Sorry but I can't seem to make the adjustment. I modified the code but now i only get five rows. When I go through it, it's copying Range A:BO and pasting it over the same range.

    In short, my code is not going to the next blank row. Any ideas? here is the modified code:
    Please Login or Register  to view this content.

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Append Data to Bottom When Using Combine & Merge Macro

    replace
    Please Login or Register  to view this content.
    with

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-14-2007
    Posts
    27

    Re: Append Data to Bottom When Using Combine & Merge Macro

    How do I get the code you provided to do a paste value instead of a paste? This step is necessary upon each iteration. If I can get it to paste value then it will be perfect! Thanks so much for your help thus far!

  6. #6
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Append Data to Bottom When Using Combine & Merge Macro

    Hi wealthistime
    try...
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    08-14-2007
    Posts
    27

    Re: Append Data to Bottom When Using Combine & Merge Macro

    I'm afraid that doesn't work at all. The code you provided before (below) works perfectly...except i need to do a paste value and not a paste...:
    Please Login or Register  to view this content.

  8. #8
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Append Data to Bottom When Using Combine & Merge Macro

    untested but try
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    08-14-2007
    Posts
    27

    Re: Append Data to Bottom When Using Combine & Merge Macro

    Woo hoo! That did the trick allright. I had tried something similar but didnt have it correctly written. Thanks so much! this will be a huge help. I wll post final code when i have some other tweaks perfected. Thank you!

  10. #10
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Append Data to Bottom When Using Combine & Merge Macro

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

    can you please add a location to your profile so we know what time zone you are in

  11. #11
    Registered User
    Join Date
    08-14-2007
    Posts
    27

    Re: Append Data to Bottom When Using Combine & Merge Macro

    FINAL CODE:
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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