Automatically move rows to another sheet and back based on value

Kgreen214

New Member
Joined
Mar 25, 2022
Messages
14
Office Version
  1. 365
Platform
  1. Windows
Hi,

Currently I am tracking Agenda Items in an excel spreadsheet. I have created the spread sheet with drop down menu’s (See attached Image). Both the Active sheet and the Completed look the same. I’m looking to move a row from my “Active” sheet to the “Completed” sheet once the status column has been updated to Complete. I would also like for that row to be deleted so that there isn’t blank rows on the sheet.

Subsequently I would also like to have it set up that if the status has been updated accidently it can be moved back to the Active sheet just by changing the status back to either “Not Started, In Progress, On Hold or Overdue”

Can someone please assist me with this? Thanks!
 

Attachments

  • Screenshot 2022-03-25 100859.png
    Screenshot 2022-03-25 100859.png
    139 KB · Views: 58
The following macro assumes you have headers in row 1 and the data starts in row 2 with no blank rows or columns. Change the column number (in red) to match the column containing "Completed" and the sheet names (in blue) to suit your needs.
Rich (BB code):
Sub CopyData()
    Application.ScreenUpdating = False
    With Sheets("Sheet1")
        .Cells(1, 1).AutoFilter 16, "Completed"
        .AutoFilter.Range.Offset(1).Copy Sheets("Closed").Cells(Sheets("Closed").Rows.Count, "A").End(xlUp).Offset(1)
        .AutoFilter.Range.Offset(1).EntireRow.Delete
        .Range("A1").AutoFilter
    End With
    Application.ScreenUpdating = True
End Sub
 
Upvote 0

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
I am managing inventory in an excel sheet.
The code you provided works when I paste it in the worksheet module. However, I wanted to use it as a Macro so I can have a button "Update" and should only move the rows when I click the button.

Can someone help me with this?

Thanks
Great question, I would like to know the same.
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,313
Members
452,634
Latest member
cpostell

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top