Macro: Loop Through a File Location

Status
Not open for further replies.

ryansm05

Board Regular
Joined
Sep 14, 2016
Messages
148
Office Version
  1. 365
Platform
  1. Windows
Hi,

If someone can help me with the below it would be much appreciated. For some context, I'm wanting a macro that can look through a file location and return specific ranges from any file saved in that location (potentially up to a 1,000 different files in this location). This will effectively be a summary of all the files saved in this location.


1) The file I'm working on and where I want to build the macro will be saved: I:\Accounts\2018\Management Accounts and the file name is Summary Sheet. The tab name is SS1.


2) The files I'm wanting to loop through will each have a different filename (all starting with a 5 digit project code) and will be saved here I:\Accounts\2018\Financial Reporting\BRD\NewRev


3) The tab name of each of the loop through files (saved with a 5 digit project code) will be C&C


4) These loop through files (saved with a 5 digit project code) can be saved as xlsm. if needed


5) From each of these loop through files (saved with a 5 digit project code), I need to extract the data from F24:AK24 and F29:AK29


6)The data (F24:AK24 and F29:AK29) from each of the loop through files (saved with a 5 digit project code) needs to be extracted to the Summary Sheet workbook in tab SS1 as described in 1)


7) The location for where the data is extracted to in the Summary Sheet can be from cell A1 for now.


8) Once extracted to the summary sheet workbook - I then need to sort all returned data alphabetically by column A


I'll be very much indebted if anyone can help me with this.

Thanks
Ryan
 
Last edited:

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread.
Per forum rules, posts of a duplicate nature will be locked or deleted (rule 12 here: Forum Rules).
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,214,638
Messages
6,120,674
Members
448,977
Latest member
moonlight6

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