Darkcloud617
New Member
- Joined
- Sep 7, 2017
- Messages
- 38
Hopefully a quick questions. The code below works like I need it to, however, it does not seem to copy the row to the other sheet. In fact... excel seems to not do anything about the p = p + 1. I am sure its an easy mistake made but I cannot seem to find the problem. Any ideas on why that may not be happening? Very much appreciated.
Code:
Sub Pending(): Dim wp As Worksheet, wa As Worksheet, a As Long, p As String
Set wp = Sheets("Pending"): Set wa = Sheets("Projects"):
p = Application.Max(3, wp.Range("A" & Rows.Count).End(xlUp).Row + 1)
For a = 5 To wa.UsedRange.Rows.Count
If wa.Range("Q" & a) = "Move" Then
wa.Range("A" & a).Resize(1, 19).Value = wa.Range("A" & p).Resize(1, 19).Value
wp.Range("A" & p) = "": p = p + 1:
End If
Next a
End Sub