VBA Code to transpose data from a Folder into a single workbook Table

Joined
Nov 21, 2016
Messages
37
Hi All,

I am wondering if anyone could help me please?

I have been given a folder called "CPET" which contains an number of workbooks which all of which have unique data but on the same rows and columns for each work book (please see the picture below).

I have been asked to put all this data into one table- which is called TBLVO2max and in a separate workbook called VO2max Database.

Below is an example of how the data looks in each work book in the folder.

I need the data from C109:G112 to be transposed into a separate table ie Row 2, C - AA

I then need the same for C116:O131 Transposed into the separate table next to the previous data (so starting at AB2 for the example above)

I currently have 30 workbooks (with more going to be added) in the folder "CPET" in which i need the same exact same transposing done and added to the table in the separate worksheet.

If possible, I would like to be able run the VBA code every time a new workbook is added to the "CPET" folder and have that data added to the end of the able.

Can anyone please help me with the VBA for this please as it is way too advance for me!

Thank you very much!

1663234178908.png
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Forum statistics

Threads
1,224,816
Messages
6,181,139
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