Extracting excel files from various folders and putting them into another

Vbanoob98

Board Regular
Joined
Sep 13, 2019
Messages
128
So I have 100 excel files called Total Results.xlsx in 100 different folders

Example

C:\invoices\Folder1\Total results.xlsx
C:\invoices\Folder2\Total results.xlsx
...
C:\invoices\Folder100\Total results.xlsx

I need to put them all into the same folder

I have the paths already in text if that help

Is there a way to do this? Or would I have to change the names first so they are not the same.

What I want to do after is consolidate all of them in a master excel. All of them have 5 sheets (same name) with the exact same format/columns etc

Thanks a lot
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Have you had a look at the Data tab, Get Data button, From File, From Folder option? (Assuming youhave Office 365, if not, please advise what your Excel version is)
 
Upvote 0
Yes, the issue is that all the files are not in the same folder. Also Power Query seems to only be able to combine 1 sheet of all the workbooks

I have excel 2016
 
Upvote 0
I solved the first part with the code from here


Now I just have to find a way to combine all the workbooks and worksheets in the same folder.
 
Upvote 0

Forum statistics

Threads
1,213,513
Messages
6,114,072
Members
448,546
Latest member
KH Consulting

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