0

Is it possible to have a VBA code to print the entire word for a searched substring for multiple files in a location on a excel sheet?

Suppose,

  • I have 10log files in location 'C:\Logs'
  • In each log file I want to search for strings listen in sheet 1 (in rows)

Eg.

    1]Red
    2]Blue
    3]Green

(where 1,2,3 are row numbers)
  • Suppose the substring Red is found in first log file log1.txt in the word Red2312
  • I want Red2312 to be printed to the next excel sheet
  • So, the output will be,
0] A  B  C |

1] Red2312 | log1.txt

2] Blue2121 | log1.txt

3] Red1234 | log7.txt

Any help would be great! Even how to go ahead with it..

Alex
  • 1
  • Have a look at this: [How do I find a specific string in one of many text .log files using VBA?](http://stackoverflow.com/a/17861992/3042759) – Tom Dec 02 '15 at 13:23
  • Possible duplicate of [How do I find a specific string in one of many text .log files using VBA?](http://stackoverflow.com/questions/17860618/how-do-i-find-a-specific-string-in-one-of-many-text-log-files-using-vba) – Tom Dec 02 '15 at 13:24
  • Are they actual ".log" files - or Excel workbooks that you are referring to as "log files" ? – SierraOscar Dec 02 '15 at 15:58

0 Answers0