MoonPrincess

New Member
Joined
Jul 1, 2022
Messages
2
I am new to this and trying to get each row to automatically get copied to my second sheet "Completed", then deleted off my main sheet...
So - when I select "completed" from the dropdown in Column "N", that entire corresponding row essentially moves over to the second sheet labeled "Completed".
Beginning at row 2.
Macros are enabled on my workbook, and I entered the code by right click sheet>View Code>Select sheet in VBAproject

I have been trying to get this to work all day but I think there is something wrong with my code. I appreciate anyone who has suggestions, or can find the issue in my code/process :)

I added screenshots of my code and workbook for reference.
 

Attachments

  • VBA_Help.PNG
    VBA_Help.PNG
    69.7 KB · Views: 35
  • VBACode.PNG
    VBACode.PNG
    53.4 KB · Views: 34

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Hello MoonPrincess,

Try the code amended as follows:-

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
 
    If Intersect(Target, Columns(14)) Is Nothing Then Exit Sub
    If Target.Count > 1 Then Exit Sub
    If Target.Value = vbNullString Then Exit Sub
 
    Application.ScreenUpdating = False
    Application.EnableEvents = False
         
    If Target.Value = "Completed" Then
    Target.EntireRow.Copy Sheets("Completed").Range("A" & Rows.Count).End(3)(2)
    Target.EntireRow.Delete
    End If
 
    Application.EnableEvents = True
    Application.ScreenUpdating = True

End Sub

I hope that this helps.

Cheerio,
vcoolio.

P.S. The code needs to be placed into the sheet module of your main data input sheet "Complaints FY2023".
BTW, Column N is column number 14 not 11.
 
Last edited:
Upvote 0
You're welcome MoonPrincess. I'm glad to have been able to assist and thanks for the feed back.

Cheerio,
vcoolio.
 
Upvote 0

Forum statistics

Threads
1,215,493
Messages
6,125,119
Members
449,206
Latest member
burgsrus

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