Automatically Move Row to Another Sheet Based On Cell Value

jonesey

New Member
Joined
Dec 6, 2023
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
Hello all, I've been trying to use other threads on the same topic here, and adjust my VBA data based on my own. However, I can never get it to work - either I don't understand VBA at all (very likely) or my company does not allow these functions. Any help would be useful.

I'm trying to move all rows that have "Complete" from the drop down in row A (Status) in sheet "Active" to sheet "Complete". Thanks!
 

Attachments

  • Test.PNG
    Test.PNG
    30.8 KB · Views: 39

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
You did say "Automatically"? Please try the following on a copy of your workbook. Right click the tab Active, select View Code & paste the following into the code window that appears on the right of screen.
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Cells.CountLarge = 1 And Not Intersect(Range("A:A"), Target) Is Nothing Then
        On Error GoTo Escape
        Application.EnableEvents = False
        If Target.Value2 = "Complete" Then
            With Target.EntireRow
                .Copy Worksheets("Complete").Cells(Rows.Count, "A").End(xlUp).Offset(1)
                .Delete
            End With
        End If
    End If
Continue:
    Application.EnableEvents = True
    Exit Sub
Escape:
    MsgBox "Error " & Err.Number & ": " & Err.Description
    Resume Continue
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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