Hi everyone,
I'm very new to VBA and have gotten this code to work for another sheet and am basically just tweaking it for my new requirements. Wondering if anyone could help explain why I'm receiving a 438 error of "Object doesn't support this property or method". Below is my code. Thanks!
Sub CopyPasteEnrollReqID()
Dim lrow As Long, i As Long, lastrow As Long, x As Long, counter As Long
With Worksheets("Requirements")
lrow = .Range("A" & .Rows.Count).End(xlUp).Row
For i = 2 To lrow
If .Cells(i).Value Like "Enrollment Through Delinquency" Then
.Range("A" & i & ":A" & i).Copy Worksheets("Enroll").Range("J" & Rows.Count).End(xlUp).Offset(1, 0)
lastrow = Worksheets("Enroll").Range("J" & Rows.Count).End(xlUp).Row
Worksheets("Enroll").Cells(lastrow).Value = .Cells(i)
End If
Next i
Worksheets("Enroll").Columns("A:A").HorizontalAlignmnet = xlCenter
End With
End Sub
Bookmarks