Copy from same area then paste into one area then do the same pasting but X columns down

drop05

Active Member
Joined
Mar 23, 2021
Messages
285
Office Version
  1. 365
Platform
  1. Windows
VBA, Is there a way if i have this code, which copies from one workbooks worksheet and pastes into another workbooks worksheet in a specific range, but i need that same copy range from another workbook but paste X amount of rows over on the same workbook worksheet i was pasting to

my code:

'copy from the first workbook

ONE_wb.Worksheets("Sheet1").Range("G14:G15").Copy
TWO_wb.Worksheets("Sheet2).Range("E11:E12").PasteSpecial Paste:=xlPasteValues

'second part of code
'different workbook to copy from and same workbook to paste into
ONE_wb.Worksheets("Sheet1").Range("G14:G15").Copy
TWO_wb.Worksheets("Sheet2).Range("I11:I12").PasteSpecial Paste:=xlPasteValues

See how the first part grabs from ONE_wb and paste into TWO_wb
then the second part grabs from ONE_wb which will move to a different workbook just same name and pastes into the same workbook TWO_wb
but the range is different going from column E to column I

is there a way to combined that to how it pastes into column E then may, im thinking an offset? that gets it over to column I to paste into?

i may be wrong but thinking an offset starting at E where offset from E so it is 0 columns then to get to I it is 4? Since I is 4 columns over from E? or am i thinking wrong? and if that is a way how would that be written?
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,215,606
Messages
6,125,803
Members
449,261
Latest member
Rachel812321

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