Run-time error '1004': PasteSpecial method of Range class failed

lbrockmeier

New Member
Joined
Dec 18, 2017
Messages
7
All of a sudden the 2nd part of this coede (where I Paste Special the last part) stopped working! The error i'm getting is "Run-time error '1004': PasteSpecial method of Range class failed

Any suggestions?




Rich (BB code):
Sub Copy_Transpose_Paste_Prices()
'
' Copy & Paste Categories
'
    Dim Last_Row5 As Long
    
    Last_Row5 = Worksheets("VGBB GO&GS Combined - Subclass").Range("A" & Rows.Count).End(xlUp).Row ' Determine the lastrow of the data to copy
    
    
    Worksheets("VGBB GO&GS Combined - Subclass").Range("A3:A3" & Last_Row5).Copy 'Copies A3 to end of the column
    
    Worksheets("VGBB Analysis").Range("B4").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:= _
        False, Transpose:=True
        
' Copy & Paste Prices


    Dim Last_Row6 As Long
    
    Last_Row6 = Worksheets("VGBB GO&GS Combined - Subclass").Range("E" & Rows.Count).End(xlUp).Row ' Determine the lastrow of the data to copy
        
    Worksheets("VGBB GO&GS Combined - Subclass").Range("E3:P3" & Last_Row5).Copy 'Copies A3 to end of the column
    
Worksheets("VGBB Analysis").Range("B6").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:= _
        False, Transpose:=True
       
             End Sub
 
Last edited by a moderator:

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Both of your copy lines are actually incorrect. They should be:

Rich (BB code):
    Worksheets("VGBB GO&GS Combined - Subclass").Range("A3:A" & Last_Row5).Copy

and:

Rich (BB code):
    Worksheets("VGBB GO&GS Combined - Subclass").Range("E3:P" & Last_Row5).Copy

and not:

Rich (BB code):
    Worksheets("VGBB GO&GS Combined - Subclass").Range("A3:A3" & Last_Row5).Copy

and:

Rich (BB code):
    Worksheets("VGBB GO&GS Combined - Subclass").Range("E3:P3" & Last_Row5).Copy
 
Upvote 0
I updated it per your code above but its still not working. Still says [h=2]Run-time error '1004': PasteSpecial method of Range class failed[/h]
 
Upvote 0
How much data are you copying? Will it fit transposed onto the other sheet?
 
Upvote 0
Yes just copying 110 rows and 10 columns. It worked previously and I just went to another version of the spreadsheet and the macro worked just fine. Not sure what's going on!
 
Upvote 0
Are you sure you're only copying 110 rows? You know you are using Last_Row5 again for the copy and not Last_Row6?
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,327
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top