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

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
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,216,073
Messages
6,128,633
Members
449,460
Latest member
jgharbawi

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