Copy paste special values from any location to any location.

MarieTherese

New Member
Joined
Mar 26, 2010
Messages
10
Hello lovely people,

I've had a look for an answer on this but can't find any solution flexible enough. I'm looking for a macro to replace the shortcut Ctrl + CSV. I've recorded the below code however it copies and pastes the selection in place, where as I want it to copy the selection and paste special values any where in the workbook.

Any ideas appreciated.

Sub PasteValues()
'
' PasteValues Macro
'
' Keyboard Shortcut: Ctrl+Shift+V
'
Selection.Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
 
But seeing it will give as an idea of what you want..

Are you wanting to copy something by hand (not within the macro)
Then select where you want to pastespecial
THEN run the macro that does the paste special ?

If that's the case, just use

Code:
Sub SpecialPaste()
Selection.PasteSpecial Paste:=xlPasteValues
End Sub
 
Upvote 0

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Hello lovely people,

I've had a look for an answer on this but can't find any solution flexible enough. I'm looking for a macro to replace the shortcut Ctrl + CSV. I've recorded the below code however it copies and pastes the selection in place, where as I want it to copy the selection and paste special values any where in the workbook.

Any ideas appreciated.

Sub PasteValues()
'
' PasteValues Macro
'
' Keyboard Shortcut: Ctrl+Shift+V
'
Selection.Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub

For anyone interested in future I figured out a way by selecting the data I want to copy pressing ctrl + c and using the following macro code:

[FONT=tahoma, sans-serif]Sub AltCSV()[/FONT]
[FONT=tahoma, sans-serif]
[/FONT]
[FONT=tahoma, sans-serif]Set ThisCell = Selection[/FONT]
[FONT=tahoma, sans-serif] On Error Resume Next[/FONT]
[FONT=tahoma, sans-serif] [/FONT]
[FONT=tahoma, sans-serif] ThisCell.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _[/FONT]
[FONT=tahoma, sans-serif] :=False, Transpose:=False[/FONT]
[FONT=tahoma, sans-serif]
[/FONT]
[FONT=tahoma, sans-serif] On Error GoTo 0[/FONT]
[FONT=tahoma, sans-serif] [/FONT]
[FONT=tahoma, sans-serif]End Sub[/FONT]
 
Upvote 0

Forum statistics

Threads
1,223,727
Messages
6,174,139
Members
452,546
Latest member
Rafafa

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