+ Reply to Thread
Results 1 to 2 of 2

Macro to move data from one sheet onto an archive sheet

  1. #1
    Registered User
    Join Date
    09-09-2020
    Location
    Ohio, USA
    MS-Off Ver
    Version 1908
    Posts
    35

    Macro to move data from one sheet onto an archive sheet

    I am trying to create a macro button on the "Procedures" sheet of this workbook that takes all entries with the status "Archived" on the "Procedures" sheet and adds them to the "Archive" sheet, while removing them from the "Procedures" sheet.
    Attached Files Attached Files

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Macro to move data from one sheet onto an archive sheet

    loop the records, check for range.row, select the row using the .entireRow property, copy it and paste it over to the new sheet. then delete the old row using the .delete method and move the remaining records UP using xlUp. loop the records from bottom to top, otherwise the row shifting will result in an endless code loop that freezes. see these for what you need:

    https://docs.microsoft.com/en-us/off...xcel.range.row

    https://docs.microsoft.com/en-us/off...ange.entirerow

    https://docs.microsoft.com/en-us/off...l.range.delete

    https://docs.microsoft.com/en-us/off...shiftdirection

+ 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. Macro/VBA to Auto Archive data to new sheet
    By BooBoo14 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-02-2018, 04:53 PM
  2. [SOLVED] Move row from sheet to archive in a macro
    By mmccra2858 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-22-2016, 09:58 AM
  3. Move a Row to archive sheet - Values Only
    By lyla22 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-26-2015, 07:16 PM
  4. Macro to copy a line to archive sheet and delete from active sheet
    By mmccra2858 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-08-2015, 09:15 PM
  5. Trying to Move an entire Row from one sheet to another Archive sheet.. Also..
    By Gurbo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-15-2014, 10:50 AM
  6. Replies: 1
    Last Post: 11-14-2014, 08:35 PM
  7. [SOLVED] Need a macro to copy dates & data from one sheet to an updating archive sheet
    By pbj in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-07-2013, 06:58 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