+ Reply to Thread
Results 1 to 5 of 5

Getting Excel to search through notepad files

  1. #1
    Registered User
    Join Date
    01-15-2010
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    29

    Getting Excel to search through notepad files

    Hello,
    Does anyone know if it is possible to get excel to search through a specified set of notepad files for a specific value and copy a secion based on that.

    The data pulled from the excel spreadsheet will have a date and data sequence, the date will correspond to a set of notepad files, 1 to 3 files in a folder containing hundreds of notepad files. Is there a way to get excel to look into those notepad files for the corresponding file that is needed, then within that file search for a dataset, and copy a data range around that data set?

    Thanks

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Getting Excel to search through notepad files

    If you search the forum using a Google site search for open "for input as" txt you'll find many examples.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    01-15-2010
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    29

    Re: Getting Excel to search through notepad files

    I checked some of the results from the search and they all relate to static names. The name of the notepad file will change depending on the date in the excel file.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Getting Excel to search through notepad files

    Recognize that there are several discrete pieces to this. You need to iterate through one or more directories to build a list of relevant files, open each in turn, read all or part to see if it contains the data you're looking for, and then import it.

    Of those, which do you know how to do, and which do you need help with?

  5. #5
    Registered User
    Join Date
    01-15-2010
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    29

    Re: Getting Excel to search through notepad files

    The list of relevant files are all kept in one folder, so I believe the list of directories should not be an issue.

    Having it open each in turn would not work as there are literally hundreds of files. So it would have to get the date from the master spreasheet and open the file with the corresponding date (the date is part of the file name) from the folder.

    Then it would need to search for a varying text string that would also come from the master spreadsheet, and pull a range of data.

    I really appreciate the help but this is so far above my head I dont know how to write code to do any of this. If no one can help I totally understand and appreciate the effort.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1