jesuisazep
New Member
- Joined
- Nov 13, 2024
- Messages
- 3
- Office Version
- 365
- 2021
- 2019
- Platform
- Windows
Hello! So I have workbook with say an inventory work sheet and then 3 subsequent sheets. I want the row to be moved to a certain sheet based off of the Value entered from the dropdown in Column N. Currently the first part of the code works when it is marked Incomplete, but it will not move anything marked completed. Im sure its an easy solution but Im struggling, any and all help appreciated!
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
' Check to see only one cell updated
If Target.CountLarge > 1 Then Exit Sub
' Check to see if entry is made in column B after row 5 and is set to "Yes"
If Target.Column = 14 And Target.Row > 7 And Target.Value = "Incomplete, Moved to Site Inspection Sheet" Then
Application.EnableEvents = False
' Copy columns B to I to complete sheet in next available row
Range(Cells(Target.Row, "C"), Cells(Target.Row, "O")).Copy Sheets("LF WDIF SI").Cells(Rows.Count, "C").End(xlUp).Offset(1, 0)
' Delete current row after copied
Rows(Target.Row).Delete
Application.EnableEvents = True
End If
End Sub
Private Sub Followup_Transfer(ByVal Target As Range)
' Check to see only one cell updated
If Target.CountLarge > 1 Then Exit Sub
' Check to see if entry is made in column B after row 5 and is set to "Yes"
If Target.Column = 14 And Target.Row > 7 And Target.Value = "Complete, Moved to WDIF FUF Sheet" Then
Application.EnableEvents = False
' Copy columns B to I to complete sheet in next available row
Range(Cells(Target.Row, "C"), Cells(Target.Row, "J")).Copy Sheets("WDIF FUF").Cells(Rows.Count, "C").End(xlUp).Offset(1, 0)
' Delete current row after copied
Rows(Target.Row).Delete
Application.EnableEvents = True
End If
End Sub