Hi all,
can someone help me to mod this so that when the rows identified are moved to another sheet the subsequent blank row is deleted from the source table, please?
can someone help me to mod this so that when the rows identified are moved to another sheet the subsequent blank row is deleted from the source table, please?
Code:
Sub Move_Closed()Dim Check As Range, r As Long, lastrow2 As Long, lastrow As Long
Application.ScreenUpdating = False
lastrow = Worksheets("Open").UsedRange.Rows.Count
lastrow2 = Worksheets("Completed").UsedRange.Rows.Count
If lastrow2 = 1 Then lastrow2 = 0
For r = lastrow To 2 Step -1
If Range("E" & r).Value = "Y" Then
Rows(r).Cut Destination:=Worksheets("Completed").Range("A" & lastrow2 + 1)
lastrow2 = lastrow2 + 1
Else:
End If
Next r
Application.ScreenUpdating = True
End Sub