BillHarris
New Member
- Joined
- Aug 5, 2002
- Messages
- 14
I have a macro which is supposed to copy and paste data from one worksheet to another, but is currently not working correctly, which reads;
Sub copytovision()
For x = 1 To 1000
If Cells(x, .Value = "Authorised" And Cells(x, 9).Value = "GJ" Then
Cells(x, .EntireRow.Select
Selection.Copy
Sheets("GJ").Select
Selection.End(xlDown).Offset(1, 0).EntireRow.Select
ActiveSheet.Paste
End If
Next x
End Sub
on running the Macro an error appears.
Run Time Error '1004'
Application-defined or Object-defined error
on the VBA degug the following is highlighted.
Selection.End(xlDown).Offset(1, 0).EntireRow.Select
It appears to be copying the required row from the worksheet "but is not pasting the data into the appropriate worksheet called "GJ"
Please help. Thanks!!!!!!!!!
This message was edited by BillHarris on 2002-08-13 09:17
This message was edited by BillHarris on 2002-08-13 09:27
Sub copytovision()
For x = 1 To 1000
If Cells(x, .Value = "Authorised" And Cells(x, 9).Value = "GJ" Then
Cells(x, .EntireRow.Select
Selection.Copy
Sheets("GJ").Select
Selection.End(xlDown).Offset(1, 0).EntireRow.Select
ActiveSheet.Paste
End If
Next x
End Sub
on running the Macro an error appears.
Run Time Error '1004'
Application-defined or Object-defined error
on the VBA degug the following is highlighted.
Selection.End(xlDown).Offset(1, 0).EntireRow.Select
It appears to be copying the required row from the worksheet "but is not pasting the data into the appropriate worksheet called "GJ"
Please help. Thanks!!!!!!!!!
This message was edited by BillHarris on 2002-08-13 09:17
This message was edited by BillHarris on 2002-08-13 09:27