+ Reply to Thread
Results 1 to 6 of 6

Add copied range from one workbook to first empty row on another workbook's Table

  1. #1
    Registered User
    Join Date
    02-17-2021
    Location
    Helsinki, Finland
    MS-Off Ver
    365
    Posts
    31

    Add copied range from one workbook to first empty row on another workbook's Table

    The below code worked fine, when both wsCopy and wsDest data was in Range.
    Now the wsDest range (there was no Table) has been converted into "Table1", so that we can use Slicer for quicker filtering.

    The code still works, but the data is now pasted (wsDest) under the Table, as it should be within the Table1.

    How can the code be modified so that the copied data will be inserted in the "Table1"'s first available row, not below the Table?



    Please Login or Register  to view this content.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,090

    Re: Add copied range from one workbook to first empty row on another workbook's Table

    Tables are typically intended to avoid the need for blank rows. And, by design or not, when you use End(xlUp) it will take you to the last row of the Table, not the last row of data.

    Maybe review the structure of the Table and remove blank rows. Or, test to see if the last row found is empty and issue a second End(xlUp).
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    02-17-2021
    Location
    Helsinki, Finland
    MS-Off Ver
    365
    Posts
    31

    Re: Add copied range from one workbook to first empty row on another workbook's Table

    wrong copy paste.....
    Last edited by Tsinos; 02-24-2023 at 07:38 AM.

  4. #4
    Registered User
    Join Date
    02-17-2021
    Location
    Helsinki, Finland
    MS-Off Ver
    365
    Posts
    31

    Re: Add copied range from one workbook to first empty row on another workbook's Table

    Quote Originally Posted by TMS View Post
    Tables are typically intended to avoid the need for blank rows. And, by design or not, when you use End(xlUp) it will take you to the last row of the Table, not the last row of data.

    Maybe review the structure of the Table and remove blank rows. Or, test to see if the last row found is empty and issue a second End(xlUp).
    I removed the empty rows from the Table but it still keeps adding the row to first row under the table.
    I stil

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,090

    Re: Add copied range from one workbook to first empty row on another workbook's Table

    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file and a mocked up solution.

  6. #6
    Registered User
    Join Date
    02-17-2021
    Location
    Helsinki, Finland
    MS-Off Ver
    365
    Posts
    31

    Re: Add copied range from one workbook to first empty row on another workbook's Table

    Quote Originally Posted by TMS View Post
    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file and a mocked up solution.
    Enclosed sample files. SalesReport.xlsm last row to be copied to Componen.xlsx Table's last row, if possible.
    I havent been able to solve this and by looks of it, not so many others either. Somehow I cant figure this out, perhaps not even possible?
    Attached Files Attached Files
    Last edited by Tsinos; 03-01-2023 at 11:56 AM.

+ 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. Replies: 2
    Last Post: 10-17-2022, 11:53 AM
  2. [SOLVED] Pasting an already copied two dimesional range from one workbook to another
    By chanauria in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-30-2016, 11:34 AM
  3. Data will be copied from a separate workbook to worksheet RawData in another workbook
    By pghpens44 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-13-2014, 10:07 AM
  4. Copy range from one workbook, paste to next empty cell in another workbook
    By glock9mm in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-23-2013, 12:16 AM
  5. [SOLVED] Copying Active Cell-Row-Range to Other Workbook is pasting an image of copied range
    By jrtraylor in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-18-2013, 01:08 AM
  6. [SOLVED] Making sure an acceptable range is copied from one workbook to another.
    By 111StepsAhead in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-16-2013, 10:54 AM
  7. Replies: 3
    Last Post: 08-23-2007, 04:47 PM

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