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.
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.
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks