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?
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?