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

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
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,213,532
Messages
6,114,176
Members
448,554
Latest member
Gleisner2

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