Copy and Paste tables from multiple sheets to another existing workbook

Slyff

New Member
Joined
Feb 10, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi Everyone!

I have to copy data from workbook1 to workbook2. I extract Workbook1 in our reporting site while Workbook 2 is located on my desktop: C:\Users\ABC\Desktop\Excel Report\

After extracting Workbook1, I need to select data range C4:AP52 in sheet1 (sometimes the range varies depending on how long the historical data. i.e. I extracted data from Dec.1, 2020 - Feb. 9, 2021, but most of the time I only extract 6 weeks worth of data - Jan.1, 2021 - Feb. 9, 2021). After selecting the data, I will now copy and paste it to Workbook2 - sheet1 C4. Then move to Workbook1 sheet2 and do the same process I did for sheet1. The process continue until all sheets from Workbook1 are copied to the sheets of Workbook2.

I have tried looking in the web if there's already an existing VBA macro that I can use but failed to find one. I'm not really good with VBA and any help is really appreciated.

Please let me know if you have any question or clarification.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Saba Sabaratnam

Board Regular
Joined
May 26, 2018
Messages
196
I know you asked for VBA solution.

However, you may want to try this method as you are using Office 365 and it will be much easier to implement once you set your worksheets


I have this table in Sheet 1 in Workbook 1.

As this is table, the formula will capture all of the data when the table grows or shrinks,

1613003855624.png



In Sheet1 of Workbook 2, I have the following filter.

1613003947003.png


Copy the headings of Sheet 1 table from Workbook 1 and enter the following formula in A7 (only in this cell)

=FILTER('Workbook 1.xlsx'!Table1[#All],('Workbook 1.xlsx'!Table1[[#All],[Date]]>=B1)*('Workbook 1.xlsx'!Table1[[#All],[Date]]<=B2))

I will bring all the data from Sheet 1 from Workbook 1 to Sheet 1 in Workbook 2 that meet your criteria.

Kind regards

Saba
 

Watch MrExcel Video

Forum statistics

Threads
1,130,397
Messages
5,641,916
Members
417,246
Latest member
elbickel

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
Top