Marco to open excel files base on modified dates & file names

tutu0001

New Member
Joined
Sep 10, 2021
Messages
1
Office Version
  1. 2010
Platform
  1. Windows
I want to create a Macro that will open multiple Excel files from a specific folder location based on the Modified dates & file name, and then copy paste it to a new spreadsheet.
For example, please see screenshot below: I want to open a file that the file name contains "Apple" for 8/10/2021 from a folder (C:\Users\xli\Desktop\Water). and then copy paste the data of this spreedsheet (A2:H10)to a master excel file and then close this apple file. and then open another apple file for 8/9/2021 from the same folder and copy past to the master file....and then do the same for the 8/6 apple file..... I have a list of the dates that I need in the master file. I need to do this on a monthly basis so the dates change every month. Is it possible to do this in Macro? Thank you so much for your help in advance!
test pi2222c.jpg
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,144,671
Messages
5,725,690
Members
422,635
Latest member
crisis

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
Top