I run a warehouse and we are getting ready to ramp up the volume of orders we receive from our customer. I want the sheet to cut the entire row and paste it into the next sheet anytime the dropdown box in column "I" is changed to yes.
The name of the sheet will be "QA"Welcome to the Board!
What is the name of the sheet you want to paste this row too?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim ows As Worksheet
Dim nws As Worksheet
Dim lr As Long
' Set name of worksheet to copy to, and name of current sheet
Set nws = Sheets("QA")
Set ows = ActiveSheet
' Exit if more than one cell updated
If Target.CountLarge > 1 Then Exit Sub
' Check to see if row > 1 and value is "Yes"
If (Target.Row > 1) And (Target.Value = "Yes") Then
' Find first blank row on new sheet
lr = nws.Cells(Rows.Count, "A").End(xlUp).Row + 1
' Copy to new sheet
Application.EnableEvents = False
ows.Rows(Target.Row).Copy nws.Cells(lr, "A")
' Delete old row
ows.Rows(Target.Row).Delete
Application.EnableEvents = True
End If
End Sub
Yes, but make sure that you put the code in the correct place. It will not go in the same place as the first code, but rather in the "QA" sheet module in VBA.Now if I want it to move out of the QA sheet in to the Ready to ship sheet do I use the same code except for the "Set nws = sheets ("QA") part?
in order that we have know how to determine which sheet to paste it to.So when 'yes' its typed in Column I it went to various other tabs (i.e customer 1, customer 2, Customer 3) depending on where they were sitting in the spreadsheet?