jtodd

Board Regular
Joined
Aug 4, 2014
Messages
194
Hi
can anyone show me how to change this macro to paste values and formats but not formulas.

Sub CopyStuff()

Range("AA4:AD34").Copy

Sheets("SummaryData").Cells(1, Columns.Count).End(xlToLeft).Offset(0, 1).PasteSpecial xlPasteValues

End Sub


if i try and add more than 1 pastespecial it comes up with errors ??
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Code:
.PasteSpecial xlPasteFormats+xlPasteValues
 
Upvote 0
Try

Code:
With Sheets("SummaryData").Cells(1, Columns.Count).End(xlToLeft).Offset(0, 1)
  .PasteSpecial xlPasteValues
  .PasteSpecial xlPasteFormats
End With
 
Upvote 0
Again thanks for your quick reply but again i get a debug message , the first pastespecial is highligted .
 
Upvote 0
and what is the error message ???
 
Upvote 0
Sorry , i have just tried again and it works fine , user error.;)

Many thanks for your help
 
Upvote 0

Forum statistics

Threads
1,215,043
Messages
6,122,825
Members
449,096
Latest member
Erald

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