Open All Files in Folder Excel for Mac (2011)

fxgump

New Member
Joined
Jul 27, 2011
Messages
5
As I can't use Application.FileSearch with Excel for Mac (2011) I'm wondering if anybody knows of an alternative to loop through all files in a folder.

What I'm trying to achieve is to extract data from a static sheet in all the XLS documents in the folder and paste them into the current workbook. Once data is extracted file is to be closed and we are to open the next sheet, copy the data, etc etc.

It seems like a fairly simple task, however, if anybody could direct or help me that would be greatly appreciated!

Thanks!
Ryan
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Dir is the usual workaround and should work on Macs.
 
Upvote 0
Hi Rory,

Thanks for your help. I've tried Dir("") but it only seems to return one file. Even if I try calling it multiple times it still returns the same file. I have four files in the folder for test purposes.
 
Upvote 0
How are you calling it? The first time you pass the folder and any file name filters to Dir(), thereafter you do not pass any arguments at all in order for it to return the next file name.
 
Upvote 0

Forum statistics

Threads
1,224,582
Messages
6,179,670
Members
452,936
Latest member
anamikabhargaw

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