Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 172
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default 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
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 172
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to Copy & Paste in backgorund Alarmbloke Excel Discussion (Misc queries) 9 January 8th 09 10:33 PM
HELP with macro for copy and paste RedOctagon Excel Discussion (Misc queries) 0 October 13th 06 02:54 PM
Copy and Paste Special (Formulas) pastes cell value if numeric [email protected] Excel Discussion (Misc queries) 2 May 2nd 06 06:24 PM
Macro to find, copy, and paste until value change Valerie Excel Worksheet Functions 4 January 26th 06 04:10 AM
Search, Copy, Paste Macro in Excel [email protected] Excel Worksheet Functions 0 January 3rd 06 06:51 PM


All times are GMT +1. The time now is 12:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"