+ Reply to Thread
Results 1 to 5 of 5

Move All new Table Rows and Clear Table

  1. #1
    Forum Contributor
    Join Date
    01-16-2020
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    171

    Move All new Table Rows and Clear Table

    I have a spreadsheet, and I am trying to come up with a way to essentially archive and clear data from a table.

    In the attached spreadsheet, there is a macro, and so far is moves and clears data from cells D3:D6 and H4:H6 from the CurrentReceipts worksheet to the Archives workbook.

    Below that header data, there is a table, which will always have at least one, but potentially many entries. I need to find a way to move that data to a new line in the Archives worksheet, drawing on the same source data in the header row each time the macro is activated. In other words, if there are three separate entries in the table on the CurrentReceipts worksheet, the same header data from D3:D6 and H4:H6 would be moved into three separate rows in the Archives worksheet, then the data from B10:H10 would be moved into each respective column in the Archives worksheet from columns I:O. Then, I need to clear the table, deleting all rows but one blank row (and the total row, of course). Hopefully that makes sense.

    Any help is much appreciated!
    Attached Files Attached Files

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Move All new Table Rows and Clear Table

    Perhaps this will do what you need?
    Please Login or Register  to view this content.
    BSB

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,210

    Re: Move All new Table Rows and Clear Table

    Another Option...
    Please Login or Register  to view this content.
    Last edited by sintek; 03-26-2022 at 08:12 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  4. #4
    Forum Contributor
    Join Date
    01-16-2020
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    171

    Re: Move All new Table Rows and Clear Table

    Thank you both so much for your help! Both solutions work flawlessly. I am so happy to have this working properly!

  5. #5
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Move All new Table Rows and Clear Table

    Glad we could help

    BSB

+ 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. Complex table transformation - Insert rows between 2000 rows and move column data to row d
    By justayellowbusman2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-28-2019, 09:19 PM
  2. Move data from 1 table to another table, then clear the original table
    By kwoltman in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-03-2019, 06:06 PM
  3. How to write VBA code to clear a table but preserve table and 1 empty row
    By kwoltman in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-28-2019, 07:26 PM
  4. Chart to move up or down with the rows of the pivot table?
    By GRG Stevan in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 11-08-2017, 07:07 AM
  5. [SOLVED] Clear n Delete Table Rows
    By kprabhupaul in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-08-2016, 04:46 AM
  6. [SOLVED] Macros To Move Multiple Rows To Another Sheet And Macro To Move Single Rows To DAX Table
    By jcaynes in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-22-2013, 05:08 PM
  7. [SOLVED] How do I move rows in a pivot table?
    By Tiff in forum Excel General
    Replies: 2
    Last Post: 02-24-2005, 03:06 PM

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