kanderson83
New Member
- Joined
- Feb 7, 2020
- Messages
- 4
- Office Version
- 2013
- Platform
- Windows
I am trying to have rows automatically move to different sheets based on 2 different values. I want the row to move once "resolved" but I want it to move to a specific sheet based on the partner. I am currently using this code below to have the rows move automatically from the "currently working" sheet to the "resolved " sheet. Instead of moving to resolved, I would like them to move to a sheet based on the partner name in column "C."
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Application.EnableEvents = False
'If Cell that is edited is in column G and the value is resolved then
If Target.Column = 7 And Target.Value = "Resolved" Then
'Define last row on resolved worksheet to know where to place the row of data
LrowResolved = Sheets("Resolved").Cells(Rows.Count, "A").End(xlUp).Row
'Copy and paste data
Range("A" & Target.Row & ":H" & Target.Row).Copy Sheets("Resolved").Range("A" & LrowResolved + 1)
'Delete Row from Project List
Range("A" & Target.Row & ":H" & Target.Row).Delete xlShiftUp
End If
Application.EnableEvents = True
End Sub
Last edited by a moderator: