Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
gus gus is offline
external usenet poster
 
Posts: 5
Default Make an indexer at rows for many txt files.

I am making the same question again couse tom didn't see my reply . (Sorry
tom)

<<<<

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
law 324 dfrdfg errtt retyrty fdgsdfg gh
sdfghfgh dfghdfgh dfghdfgh
fghdfgh
fghdf
fghfhgffghdfhfgh fghfgh dfghdfghdfgh"

I search the string "law 324" .
Tha macro finds it and then copies all the text from the beggining of the
text file up to line the string exists , to the cell a1.

Then comes the secont txt file , then the third etc.

----------------------------------------------------------

The text string i am searcing is located in all the text Files
And is a number that defines what this text file is (for example (law 324)
, (law 456)
I am trying to make an indexer for these txt files
An indexer that describe that the <txt1.txt file is the Law 324 , the
<txt2.file is the Law456 e.t.c
Thanks


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
group workbooks/files to make global changes? MikeR-Oz New Users to Excel 1 September 12th 08 11:21 PM
How make 7 recent Excel files appear on Excel2003 list? AmyLowCPA Excel Discussion (Misc queries) 2 December 23rd 06 05:11 PM
make excel files executable Horatio J. Bilge Excel Discussion (Misc queries) 4 June 28th 05 02:49 PM
Hyperlinks to Files, Make Them Go Away Joe Reggae Links and Linking in Excel 3 May 4th 05 11:55 PM
Make toolbar buttons appear only in specific files? Christiane[_9_] Excel Programming 5 April 27th 04 08:25 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"