PC Review


Reply
Thread Tools Rate Thread

Checking specific text string in excel files stored in a folder

 
 
AG
Guest
Posts: n/a
 
      16th Mar 2010
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.
 
Reply With Quote
 
 
 
 
AG
Guest
Posts: n/a
 
      16th Mar 2010
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.
 
Reply With Quote
 
AG
Guest
Posts: n/a
 
      17th Mar 2010
Hi,
can someone please help me with the above problem? Many thanks.

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      17th Mar 2010
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
 
Reply With Quote
 
AG
Guest
Posts: n/a
 
      18th Mar 2010
Thank you Dave. It helped a lot.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to search Excel files based on a specific text string in VBA c Bob Microsoft Excel Misc 1 6th Mar 2009 05:09 AM
Checking if a property contains another specific string =?Utf-8?B?aHVnZWhlYWQ=?= Microsoft Excel Programming 1 13th Sep 2007 05:52 PM
FYI: One macro really helped for capturing data from multiple workbook stored in a specific folder to one excel file only Smits Microsoft Excel Programming 0 8th Nov 2006 04:37 AM
how can I specific a folder with wildcard criteria and excel will import all the correct files in that folder? Raven Microsoft Excel Misc 1 24th Jan 2006 03:28 PM
how can I specific a folder with wildcard criteria and excel will import all the correct files in that folder? Raven Microsoft Excel Programming 1 24th Jan 2006 04:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:55 AM.