Copying data from external workbook based on heading

Mofasa777

New Member
Joined
Apr 30, 2016
Messages
20
So I have been trying to do this thing for a while but I was not able to. I usually would search more etc but I have a very tight deadline plus I am not very familiar with VBA (only c++, java)
I have a excel file (Workbook) with multiple of sheets that all contain data (Source). I have another excel file that contains again multiple worksheets that contain ONLY the headings (Target).
What I want to do is a code that goes to the target workbook and takes the heading, then goes to the source workbook and loops through all the worksheets until it finds this heading and then copies the data into the target workbook.
Keep in mind all headings in the source file are at the same row in all the worksheets. Explanation
I hope its clear. Your help is greatly appreciated. If this is explained somewhere in detail I am sorry I didnt find it and you can provide me a link.
Thanks in advance!

Link for small example to make it clear is provided!
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

Forum statistics

Threads
1,215,327
Messages
6,124,290
Members
449,149
Latest member
mwdbActuary

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