Prev: active worksheet
Next: User Account
From: AG on 15 Mar 2010 23:51 Hi, I need to write a code that can do the following: 1) prompt user to select a particular folder 2) search for a particular text string, for e.g., ABCD in all the excel files in that folder (the number of files in the folder will vary and so does the names of the files). Is it possible to specify the string that we want to search on the fly when macro is run? 3) create a simple report that contains the filename in one column and yes / no in the second column that tell me which file names contain that keyword (it will be great if the path of the file can be recorded in the 3rd column that we can click to open the file). Currently we do this manually and I am looking for a way to automate the same. Any help on this will be much appreciated. Thanks.
From: AG on 16 Mar 2010 00:00 One thing I forgot to mention is once the user selects the primary folder then there will be subfolders that contain the excel files. The name and number of subfolders and the excel files inside them both vary. Capturing the path to the excel files will really help us. Thanks.
From: AG on 16 Mar 2010 20:54 Hi, can someone please help me with the above problem? Many thanks.
From: Dave Peterson on 16 Mar 2010 22:25 Maybe you could use Chip Pearson's addin: http://www.cpearson.com/Excel/FolderTree.aspx Get your list (in column A) and use a formula like: =countif(a1,"*abcd*")>0 in column B AG wrote: > > Hi, > I need to write a code that can do the following: > 1) prompt user to select a particular folder > 2) search for a particular text string, for e.g., ABCD in all the > excel files in that folder (the number of files in the folder will > vary and so does the names of the files). Is it possible to specify > the string that we want to search on the fly when macro is run? > 3) create a simple report that contains the filename in one column and > yes / no in the second column that tell me which file names contain > that keyword (it will be great if the path of the file can be recorded > in the 3rd column that we can click to open the file). > > Currently we do this manually and I am looking for a way to automate > the same. > > Any help on this will be much appreciated. Thanks. -- Dave Peterson
From: AG on 17 Mar 2010 20:39 Thank you Dave. It helped a lot.
|
Pages: 1 Prev: active worksheet Next: User Account |