A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Charts and Charting
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Auto look through subfolders



 
 
Thread Tools Display Modes
  #1  
Old February 14th, 2006, 08:41 AM posted to microsoft.public.excel.charting
external usenet poster
 
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  
Old February 14th, 2006, 02:35 PM posted to microsoft.public.excel.charting
external usenet poster
 
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


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto recovery problem with MS Word 2003 (11.6359.6360) SP1 Kwinten General Discussions 1 November 27th, 2007 02:43 AM
How come auto text shows in "Styles" instead of "Auto Text"? hsimpson59 General Discussion 1 May 1st, 2005 05:04 PM
Auto resize, auto realign, auto ANYTHING driving me crazy [email protected] Powerpoint 2 April 30th, 2005 02:14 AM
auto save, auto backup poonam Worksheet Functions 1 July 15th, 2004 03:29 PM
summing based on auto filter Art General Discussion 2 June 13th, 2004 04:19 PM


All times are GMT +1. The time now is 09:35 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.