Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
grewpp
 
Posts: n/a
Default Auto look through subfolders


Please help.

I can write a macro that will extract data from all excel files in a
specific folder.

What I need to be able to do is write a macro that will automatically
extract data from excel files within folders and sub folders and sub
sub folders etc

For example the data is all held on the following directory:

H:\development forms\2006 cost sheets\

And within that directory by customer - for example Tesco, Boots, Asda
etc. These customers are then subdivided into product ranges - eg
1,2,3,4 etc and some futher subdivided by national or exclusive. All
the excel files are in exactly the same format. I need to extract the
exact same data from each cost sheet into one workbook.

There are approximately 450 cost sheets at present, which changes on a
daily basis. I have a macro that will look mat all the files within an
individual folder, but as I need to refresh this several times during
the day it does take too long to search through every sub folder.

I should point out that my Macro skills are very limited.

I do hope somebody can help.

Paul Grewer


--
grewpp
------------------------------------------------------------------------
grewpp's Profile: http://www.excelforum.com/member.php...o&userid=31005
View this thread: http://www.excelforum.com/showthread...hreadid=512144

  #2   Report Post  
Posted to microsoft.public.excel.charting
Tushar Mehta
 
Posts: n/a
Default Auto look through subfolders

Assuming you have a subroutine that has a parameter of the folder-to-be-
searched...

Whatever method you are using to find the files in the folder has a
complimentary method to identify the sub-folders. Use that to loop through
all the sub-folders calling the same subroutine for each folder.

This recursive algorithm is the easiest to implement.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...

Please help.

I can write a macro that will extract data from all excel files in a
specific folder.

What I need to be able to do is write a macro that will automatically
extract data from excel files within folders and sub folders and sub
sub folders etc

For example the data is all held on the following directory:

H:\development forms\2006 cost sheets\

And within that directory by customer - for example Tesco, Boots, Asda
etc. These customers are then subdivided into product ranges - eg
1,2,3,4 etc and some futher subdivided by national or exclusive. All
the excel files are in exactly the same format. I need to extract the
exact same data from each cost sheet into one workbook.

There are approximately 450 cost sheets at present, which changes on a
daily basis. I have a macro that will look mat all the files within an
individual folder, but as I need to refresh this several times during
the day it does take too long to search through every sub folder.

I should point out that my Macro skills are very limited.

I do hope somebody can help.

Paul Grewer


--
grewpp
------------------------------------------------------------------------
grewpp's Profile:
http://www.excelforum.com/member.php...o&userid=31005
View this thread: http://www.excelforum.com/showthread...hreadid=512144


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto tab- Auto fill Snoopy New Users to Excel 0 January 25th 06 02:10 PM
Running auto correct on startup? Mitch Excel Discussion (Misc queries) 1 November 28th 05 06:38 PM
Averaging Values in Auto Filter Mr. Jan Park Excel Worksheet Functions 1 August 3rd 05 03:51 PM
excel links update not working in auto, calculations in auto Mikey Boy Excel Worksheet Functions 0 December 7th 04 11:53 PM
Why can't my macro use Auto Filter when I told the Sheet Protecti. KC Rippstein Excel Worksheet Functions 1 October 28th 04 06:13 PM


All times are GMT +1. The time now is 07:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"