I'm trying to write a macro that will locate and copy the last row of information in a worksheet and paste it into another worksheet. This is what I've written so far:
Dim counter As Integer
For counter = 1 To 25
i = counter - 1
If Cells(1, counter) < 1 Then Range("Ai:Fi").Select
Selection.Copy
Worksheets("Sheet2").Activate
Worksheets("Sheet2").Range("K2:P2").Select
Range("K2:P2").Select
ActiveSheets.Paste
Next counter
End
When I run the debugger, I get runtime error 424 "Object required"
Any suggestions??? Thanks so much in advance for your help!
Dim counter As Integer
For counter = 1 To 25
i = counter - 1
If Cells(1, counter) < 1 Then Range("Ai:Fi").Select
Selection.Copy
Worksheets("Sheet2").Activate
Worksheets("Sheet2").Range("K2:P2").Select
Range("K2:P2").Select
ActiveSheets.Paste
Next counter
End
When I run the debugger, I get runtime error 424 "Object required"
Any suggestions??? Thanks so much in advance for your help!