![]() |
Copy & Paste Special Macro
I'm trying to write a macro to cut and paste values only from one worksheet
to another. I have the copy and paste down but I don't know how to do the "paste special" part. Can anyone help? Public CopyOne() Worksheets("Sheet2").Range("A1:C8").Copy _ Destination:=Worksheets("Sheet3").Range("A1") End Sub |
Copy & Paste Special Macro
Worksheets("Sheet2").Range("A1:C8").Copy
Worksheets("Sheet3").Range("A1").pastespecial paste:=xlpastevalues or worksheets("sheet3").range("a1:c8").value _ = Worksheets("Sheet2").Range("A1:C8").value Secret Squirrel wrote: I'm trying to write a macro to cut and paste values only from one worksheet to another. I have the copy and paste down but I don't know how to do the "paste special" part. Can anyone help? Public CopyOne() Worksheets("Sheet2").Range("A1:C8").Copy _ Destination:=Worksheets("Sheet3").Range("A1") End Sub -- Dave Peterson |
Copy & Paste Special Macro
hi,
this works Sub macPasteTest() Sheets("sheet2").Select 'change to fit your data. Range("A1:C18").Copy 'this was just testing Sheets("sheet3").Select Range("A1").PasteSpecial xlPasteAll End Sub regards FSt1 "Secret Squirrel" wrote: I'm trying to write a macro to cut and paste values only from one worksheet to another. I have the copy and paste down but I don't know how to do the "paste special" part. Can anyone help? Public CopyOne() Worksheets("Sheet2").Range("A1:C8").Copy _ Destination:=Worksheets("Sheet3").Range("A1") End Sub |
Copy & Paste Special Macro
Perfect! Thanks Dave!
"Dave Peterson" wrote: Worksheets("Sheet2").Range("A1:C8").Copy Worksheets("Sheet3").Range("A1").pastespecial paste:=xlpastevalues or worksheets("sheet3").range("a1:c8").value _ = Worksheets("Sheet2").Range("A1:C8").value Secret Squirrel wrote: I'm trying to write a macro to cut and paste values only from one worksheet to another. I have the copy and paste down but I don't know how to do the "paste special" part. Can anyone help? Public CopyOne() Worksheets("Sheet2").Range("A1:C8").Copy _ Destination:=Worksheets("Sheet3").Range("A1") End Sub -- Dave Peterson |
All times are GMT +1. The time now is 11:11 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com