Sub CopyRange()
Sheets("Sheet1").Range("C4:E4").Copy _
Destination:=Sheets("Sheet1").Range("G10")
End Sub
If Destination argument is omitted, Microsoft Excel copies the range to the Clipboard.
If you only want to copies value of the range (simulate copy paste specials value), you may use the following code:
Sub CopyPasteValue()
Sheets("Sheet1").Range("C4:E4").Copy
Sheets("Sheet1").Range("G10").PasteSpecial _
Paste:=xlPasteValues
End Sub
No comments:
Post a Comment