+ Reply to Thread
Results 1 to 2 of 2

Macro to copy/paste tables from one worksheet into another

  1. #1
    Registered User
    Join Date
    02-29-2012
    Location
    Washington, DC
    MS-Off Ver
    Excel 2013
    Posts
    10

    Macro to copy/paste tables from one worksheet into another

    Hey there all,

    I've got a spreadsheet I use to manage the inventory of a small side-business I run. This spreadsheet involves tables across multiple sheets that can vary in size depending on my inventory.

    Ultimately, I need to be able to copy/paste these tables (there are 14-15) into a spreadsheet that has a completely different format. I will be using this spreadsheet to copy/paste my inventory into a forum thread - so it needs to list these tables in sequential order with appropriate gaps (2-3 rows) in between each table. I've created a spreadsheet 'shell' that has the titles of each table already in place.

    So far I've been able to figure out how I can copy/paste these tables to the clipboard and over to another sheet, even with the changing table sizes - I recorded a macro that can select and copy all the tables using Control + Shift + Down and Right arrow keys. The way I tried to work it was inserting copied cells by the shortcut Control + Shift + "+", then doing Control + Down arrow, Control + Down Arrow, then Down Arrow. This put me in the appropriate cell reference for the next table to be inserted. Sadly, VBA didn't seem to capture these keystrokes, but rather it pasted my clipboard to a specific cell reference (e.g. A264)

    Obviously, this macro works fine when the amount of rows in each inventory table don't change. Sadly, they do..

    How can I record/write this macro in order to make it work with relative references, etc?

    I'm happy to forward this spreadsheet if it would help explain my situation - I know the above was probably hard to follow.

    Thanks in advance for all the help!

  2. #2
    Registered User
    Join Date
    03-06-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Macro to copy/paste tables from one worksheet into another

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-29-2012
    Location
    Washington, DC
    MS-Off Ver
    Excel 2013
    Posts
    10

    Re: Macro to copy/paste tables from one worksheet into another

    Quote Originally Posted by zalora View Post
    Please Login or Register  to view this content.

    That didn't appear to work for me - If anyone is inclined to help, I'd be more than happy to shoot you an e-mail with this spreadsheet attached. I think it would really help expedite the process since this is a fairly unique workbook structure.

  4. #4
    Registered User
    Join Date
    02-29-2012
    Location
    Washington, DC
    MS-Off Ver
    Excel 2013
    Posts
    10

    Re: Macro to copy/paste tables from one worksheet into another

    Oops, double post.

+ 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