VBA - Pull data from other files

The Power Loon

New Member
Joined
Feb 7, 2020
Messages
34
Office Version
  1. 365
Platform
  1. Windows
Every day, I have a folder with 10 excel files with a single sheet of reports in them. The data extends through column BS and has variable amount of rows. The file names always vary, but always end up in numerical order from earliest to latest. Currently, I open each one, copy the contents, and paste into the corresponding sheet in a master file for that day, with sheet names 7:30, 8:30, 9:30, etc..

Unfortunately, I haven't been able to work out a method to automate this. It doesn't appear Get Data will do what I want either. Is this even possible to automate with VBA?

Let me know if anyone can help me, or if it is impossible.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
That is pretty easy to achieve. But I need a bit more information on the file names and how they relate to the workbook name and sheet name where they are to be copied to. Some clear examples please.

Also, are they to be added to the last row of the sheet, or just copied as a new sheet to the workbook and renaming the tab with the relevant time?
 
Upvote 0

Forum statistics

Threads
1,215,168
Messages
6,123,408
Members
449,098
Latest member
ArturS75

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