Hello, I am trying to figure out how to limit copy/paste cell to a maximum of 8(A-H) columns on "Completed" sheet instead of the entire row because I need to use column 9(I) with another formula on the newly pasted values.
I tried following code after extensive search with no luck
What am I doing wrong??? Thank you for any help I could get on this.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("G:G")) Is Nothing Then
If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
Dim Lastrow As Long
Lastrow = Sheets("Completed").Cells(Rows.Count, "A").End(xlUp).Row + 1
If Target.Value = "Add" Then
Rows(Target.Row).Copy Destination:=Sheets("Completed").Rows(Lastrow)
Rows(Target.Row).Delete
End If
End If
End Sub
I tried following code after extensive search with no luck
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("G:G")) Is Nothing Then
If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
Dim Lastrow As Long
Lastrow = Sheets("Completed").Cells(Rows.Count, "A").End(xlUp).Row + 1
If Target.Value = "Add" Then
Range(Target.Row.Range(A:H)).Copy Destination:=Sheets("Completed").Rows(Lastrow)
Rows(Target.Row).Delete
End If
End If
End Sub
What am I doing wrong??? Thank you for any help I could get on this.