Copy a range based on column selection

hmaveal

New Member
Joined
Sep 22, 2010
Messages
11
Heres what I need to do....

Lets say I select cell A5...I need to copy A5:J5 to another location.
And return to A5 when the paste.selection is complete.

The initial column will always be the same, the row will be a variable.

Any help ??
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Try ~

Code:
Sub CpReturn()

    ActiveCell.Range("A1:J1").Select
    back = Selection.Value
    Range("K10:T10") = back 'Where K1:T1 is, insert your range to copy to
    'Must be the same size as original selection
    ActiveCell.Select
End Sub

Take note of comment in macro
 
Upvote 0

Forum statistics

Threads
1,224,536
Messages
6,179,402
Members
452,909
Latest member
VickiS

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