gemcgraw
Board Regular
- Joined
- Mar 11, 2011
- Messages
- 72
I was attempting to run a macro to copy rows from one sheet to another based on a "IF" condition. I get the following Run-Time error '1004':
"The information cannot be pasted because the Copy area and the Paste area are not the same size and shape. Try one of the following:
Click a single cell, and then paste. Select a rectangle that's the same size and shape, and then paste." I'm presuming that the Source sheet is the active sheet the macro is looking at? Else, how do I designate a 'source' sheet? The error is true; I have data in the source sheet of A2:AF905. Sheet5 or named "CURR-FILTER" is basicaly blank.
Here is the macro that I am running:
"The information cannot be pasted because the Copy area and the Paste area are not the same size and shape. Try one of the following:
Click a single cell, and then paste. Select a rectangle that's the same size and shape, and then paste." I'm presuming that the Source sheet is the active sheet the macro is looking at? Else, how do I designate a 'source' sheet? The error is true; I have data in the source sheet of A2:AF905. Sheet5 or named "CURR-FILTER" is basicaly blank.
Here is the macro that I am running:
Code:
Sub MoveNonDrop()
Dim couNter As Long
Dim RowCount As Long
Application.ScreenUpdating = False
RowCount = 905
couNter = 2
Do Until couNter > RowCount
If Not Range("A" & couNter).Value = "DROPPED" Then
Range("A" & couNter).EntireRow.Copy Destination:=Sheet5. _
Range("A" & couNter).End(xlDown).Offset(1, 1)
RowCount = RowCount + 1
couNter = couNter + 1
End If
couNter = couNter + 1
Loop
Application.ScreenUpdating = True
End Sub