Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to make a macro that open all the texts files from a specified
directory one by one. Everytime a txt file is opened i want to search for a specified string (for ex. PETER) and if the string exists then all the text before this string must copied to a empty cell at any colunm (for example c1) Then the secont text to c2 , c3 e.t.c lets see an example. The text file text1.txt has the folowing text. "sdfgdfg dfgdfgsd fghdfghfgh fgfghdfgh gfhfghdfgh fghfdgh fghfdgh gfhdfgh fghfgh 54645645 5464546 gfhdfghfg gfhfghj vcbncvbn hfgh rthyrtyertyrty greece summertime dfrdfg errtt retyrty fdgsdfg gh sdfghfgh dfghdfgh dfghdfgh fghdfgh fghdf fghfhgffghdfhfgh fghfgh dfghdfghdfgh" I search the string "greece" . Tha macro finds it and then copies all the text before and up to this string to the cell a1. Then comes the secont txt file , then the third etc. Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find text in a cell and copy text to another cell | Excel Discussion (Misc queries) | |||
Copy List of text to a single cell? | Excel Discussion (Misc queries) | |||
Copy List of text to a single cell? | Excel Discussion (Misc queries) | |||
How to I copy text from a range of cells to another single cell? | Excel Discussion (Misc queries) | |||
Find text in cell, copy row to new sheet | Excel Discussion (Misc queries) |