steve400243
Active Member
- Joined
- Sep 15, 2016
- Messages
- 429
- Office Version
- 365
- 2016
- Platform
- Windows
Hello, I need to have a way for both codes to work together in my worksheet. They both work separately. Please see below code and Thanks for all help provided. It is really great help.
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
' Only run when a single cell is updated
If Target.CountLarge > 1 Then Exit Sub
' Check to see if column C or E updated
If Target.Column = 3 Or Target.Column = 5 Then
' Update cell to right
Target.Offset(0, 1) = Now()
End If
-------------------------------------------------------------------------------------
If Not Intersect(Target, Range("A:A")) Is Nothing Then
If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
Dim Lastrow As Long
Dim Lastrowa As Long
Lastrow = Sheets("shipped").Cells(Rows.Count, "A").End(xlUp).Row + 1
If Target.Value = "shipped" Then
Target.Resize(, 14).Copy
If Target.Value = "shipped" Then Sheets("shipped").Range("A" & Lastrow).PasteSpecial (xlPasteValues)
Application.EnableEvents = False
Rows(Target.Row).Delete
Application.EnableEvents = True
End If
End If
End Sub