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: 57

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
What I just discovered as I am loading up our schedule and showing completed jobs, it over writes A2 in "Closed" every time, is there a fix for this?
 
Upvote 0
Can you use the XL2BB add-in (icon in the menu) to post screen shots (not pictures) of both sheets?
 
Upvote 0
I tried to download the XL2BB add in, just goes to a blank excel screen
 
Upvote 0
You could upload a copy of your file to a free site such as www.box.com or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here (de-sensitized if necessary).
 
Upvote 0
Try:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.CountLarge > 1 Then Exit Sub
    If Intersect(Target, Range("P:P")) Is Nothing Then Exit Sub
    Application.ScreenUpdating = False
    Application.EnableEvents = False
    Dim LastRow As Long
    If Target = "Completed" Then
        With Sheets("Closed")
            LastRow = .Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row + 1
            Target.EntireRow.Copy .Range("A" & LastRow)
            Target.EntireRow.Delete
        End With
    End If
    Application.EnableEvents = True
    Application.ScreenUpdating = True
End Sub
 
Upvote 0
That worked great, thank you. If I apply the code to both data/closed, if i move something back to data will it go to bottom of data already on that sheet.
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,592
Messages
6,120,433
Members
448,961
Latest member
nzskater

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