VBA MOVE row with checkbox check in column "N" to "COMPLETED" sheet

nathanw90

New Member
Joined
Feb 11, 2025
Messages
2
Office Version
  1. Prefer Not To Say
Hello all,

Brand new to this in Excel, but have got this far!

I've been able to make the data copy to the new sheet when the box is checked, but but I cannot figure out how to make the row delete from the original sheet.

Here's the code I'm using currently...

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("N:N")) Is Nothing Then
If Target.Value = "True" Then
Dim COMPLETED As Worksheet
Set COMPLETED = ThisWorkbook.Sheets("COMPLETED")
Rows(Target.Row).Copy Destination:=COMPLETED.Cells(COMPLETED.Rows.Count, 1).End(xlUp).Offset(1, 0)

End If
End If
End Sub
 

Attachments

  • Screenshot 2025-02-11 112027.png
    Screenshot 2025-02-11 112027.png
    75.6 KB · Views: 3
  • Screenshot 2025-02-11 112035.png
    Screenshot 2025-02-11 112035.png
    39.1 KB · Views: 4
Okay,

So I got it working, but I want this to run constantly. How to I make this macro run all the time?
 
Upvote 0
Try this:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("N:N")) Is Nothing Then
        If Target.Value = "True" Then
            Dim COMPLETED As Worksheet
            Set COMPLETED = ThisWorkbook.Sheets("COMPLETED")
            Application.EnableEvents = False
            Rows(Target.Row).Copy Destination:=COMPLETED.Cells(COMPLETED.Rows.Count, 1).End(xlUp).Offset(1, 0)
            Rows(Target.Row).Delete
            Application.EnableEvents = True
        End If
    End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,226,771
Messages
6,192,926
Members
453,767
Latest member
922aloose

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