I\'ve exported data from Project 2010. The result is a long table containingg 7
ID: 3563706 • Letter: I
Question
I've exported data from Project 2010. The result is a long table containingg 7 types of information. I want to copy portions of the table to adjacent columns. I used the macro recorder to
add autofilters
select the section I want to copy using the autofilter.
deselct the autofilter
scroll to the cell I want to paste the date to.
I receive an error 1004 that the paste method of worksheet class failed.
Here's the code:
ActiveSheet.Range("$A$1:$H$288").AutoFilter Field:=3, Criteria1:="1"
Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Range("A1:G42").Select
Selection.copy
Selection.End(xlUp).Select
ActiveSheet.Range("$A$1:$H$288").AutoFilter Field:=3
Range("I1").Select
ActiveSheet.Paste
The code failed at "ActiveSheet.Paste"
Thanks in advance for the help!!!!.
Explanation / Answer
Perhaps if you modify the code like this:
ActiveSheet.Range("$A$1:$H$288").AutoFilter Field:=3, Criteria1:="1"
Range("A1").CurrentRegion.copy Destination:=Range("I1")
ActiveSheet.Range("$A$1:$H$288").AutoFilter Field:=3
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.