Hi folks,
I am trying to modify this code to work as follows:
When "Amelia Rollins" appears in column A of worksheet "Step1", cut range A:D (same row #)
Paste range A:D into Worksheet "Amelia", row 6, down.
I am trying to modify this code to work as follows:
When "Amelia Rollins" appears in column A of worksheet "Step1", cut range A:D (same row #)
Paste range A:D into Worksheet "Amelia", row 6, down.
Code:
Sub MoveStep1() Dim i As Variant
Dim endrow As Integer
Dim Step1 As Worksheet, Amelia As Worksheet
Set Step1 = ActiveWorkbook.Sheets("step1")
Set Amelia = ActiveWorkbook.Sheets("Amelia")
endrow = ASR.Range("A" & ASR.Rows.Count).End(xlUp).Row
For A = 2 To endrow
If ASR.Cells(A, "Amelia Rollins").Value = "Amelia Rollins" Then
ASR.Cells(A, "Amelia Robbins").EntireRow.Cut Destination:=amelia.Range("A" & Step1.Rows.Count).End(xlUp).Offset(1)
End If
Next
End Sub
Last edited: