Macro to copy data from 100+ files

FF74Ever

New Member
Joined
Oct 19, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi,

I am in urgent need of help, and hope that you are able to help me.

I need a macro to go to a folder (the folder path is specified in a specific cell (A5 in sheet1)), open each file in that folder, check if cell A15 has data, if not, to skip that file and go to the next file. If cell A15 does have data, then to copy all the data from A15 to column L and to the bottom of the data, to Sheet2 in the current active workbook/file. Once the data has been copied, it should then go to the next file, and check cell A15 again, and copy the data if there is any, but to the bottom of any data already copied in Sheet2.

I hope that you are able to help, as currently this process is taking me about 3/4 hours to complete, and I'm having to do it on a weekly basis.

Many many thanks in advance
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hi

While this is certainly possible with VBA, it tends to be better to use Power Query these days, if possible. There is native functionality for just this. Please see this short video by MrExcel:

I suggest you give that a crack and then if you get stuck let us know what you have done so that we can give you further guidance.
 
Upvote 0
Solution
Hi

While this is certainly possible with VBA, it tends to be better to use Power Query these days, if possible. There is native functionality for just this. Please see this short video by MrExcel:

I suggest you give that a crack and then if you get stuck let us know what you have done so that we can give you further guidance.
This worked a dream, thanks ever so much!!! I didn't even know about Power Query.....I will definitely be using it alot more going forward!!

Thanks again
 
Upvote 0

Forum statistics

Threads
1,214,397
Messages
6,119,273
Members
448,883
Latest member
fyfe54

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