VBA to copy multiple range sets of cells and insert them into another workbook

JulianV

New Member
Joined
Feb 21, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hello Everyone.
I am new with VBA. I have been watching tons of videos to get some insight on how to do what I want but to no avail, I think there’s multiple solutions to get around this, but I lack the knowledge.

I want to get my “Journal Entry workbook” (I’ll call this “Workbook1”) to auto-populate taking some specific information from another workbook (I’ll call this “Workbook2”) that contains the credit card transactions for the first 2 weeks of the month of several Cardholders in individual Sheets each one (I'll call each sheet "Name1, "Name2", "Name3").
Since this is on a semimonthly basis, I also need to be able to update Workbook1 with the remaining transactions from Workbook3 (which will be the same as Workbook2 but with the remaining transactions of the month) without affecting the previous information already inserted in Workbook1 from Workbook2, so this last part will need to be inserted above of the previous information for each cardholder in Workbook1.

Example

Workbook2 with individual Sheets: Name1, "Name2", "Name3. Cells highlighted in blue need to be copied and inserted in a specif place in Workbook1 for each cardholder:

Copy D6:D11 from Name1 and insert them in Workbook1 above A3.
Copy E6:E11 from Name1 and insert them in Workbook1 above L3.
Copy F6:F11 from Name1 and insert them in Workbook1 above J3.
Copy G6:G11 from Name1 and insert them in Workbook1 above G3.
Copy I6:I11 from Name1 and insert them in Workbook1 above K3.

Copy D6:D14 from Name2 and insert them in Workbook1 above A7.
Copy E6:E14 from Name2 and insert them in Workbook1 above L7.
Copy F6:F14 from Name2 and insert them in Workbook1 above J7.
Copy G6:G14 from Name2 and insert them in Workbook1 above G7.
Copy I6:I14 from Name2 and insert them in Workbook1 above K7.

Copy D6:D14 from Name2 and insert them in Workbook1 above A11.
Copy E6:E14 from Name2 and insert them in Workbook1 above L11.
Copy F6:F14 from Name2 and insert them in Workbook1 above J11.
Copy G6:G14 from Name2 and insert them in Workbook1 above G11.
Copy I6:I14 from Name2 and insert them in Workbook1 above K11.
1645563883220.png


1645565805726.png


1645565888908.png


1645565619925.png



The result should be this:

1645566677564.png



Note: Transactions for remaining dates of February should be inserted above row3, row13 and row26 respectively.

Thank you so much for help, I have been doing all this manually for over 2 years with over 300 Credit card holders and I am really frustrated not being able to find a solution for this.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,224,822
Messages
6,181,164
Members
453,021
Latest member
Justyna P

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