oohhhh, nvm. I see what I did.
Got a <> in there instead of a =
Option Explicit
Sub transfer()
Dim x As Integer
Dim y As Integer
y = 13
Do While left(Worksheets("paid").Cells(y, 20), 1) = "P"
y = y + 1
Loop
For x = 13 To 42
If Left(Cells(x, 20), 1) = "P" Then
Worksheets("paid").Range(Worksheets("paid").Cells(y, 1), Worksheets("paid").Cells(y, 20)).Value = Range(Cells(x, 1), Cells(x, 20)).Value
y = y + 1
End If
Next x
End Sub
You got a "Subscript out of range" error I'm guessing? that y = y + 1 was looping to infinity and beyond, if I'm not mistaken.
mew.
Bookmarks