Paste right to left

Bob G

New Member
Joined
Nov 27, 2012
Messages
8
So i need to take a range of information from one sheet and paste it to another sheet. Here's the kicker, I need it to paste in the same order, but to the left of the selected cell. I'll try to explain simplified:

Sheet2: Range= O12:T12 (copy value)

Sheet1: Current values in J9:V9. Insert copied cells at I9=T12 to D9=O12

D9:I9 are blank cells

I know the easy answer is to select D9 and paste normal. This is a very simplified version. I'm looking at pasting more than 100 cells over several columns and rows. Inevitably this would be a paste right to left function, opposite of the standard paste left to right.
 
Last edited:

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Just use the Offset property to adjust the range relative to J9...
Code:
Worksheets("Sheet2").Range("O12:T12").Copy Worksheets("Sheet1").Range("J9").Offset(,-5)
 
Upvote 0
Is this something I can put into VBA as a macro? and is there a way to set "J9" as a variable where the variable is equal to the selected cell? I can leave the range set as the information being copied will always remain the same, but where it is being pasted will change.
 
Upvote 0
Is this something I can put into VBA as a macro? and is there a way to set "J9" as a variable where the variable is equal to the selected cell? I can leave the range set as the information being copied will always remain the same, but where it is being pasted will change.

Okay, assuming you are running the code from Sheet1 (so that the selected cell is visible)...
Code:
Worksheets("Sheet2").Range("O12:T12").Copy ActiveCell.Offset(,-5)
This line of code can be placed directly in a macro.
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,598
Members
449,089
Latest member
Motoracer88

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