LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Extract Data from Text Files

I知 looking for a excel macro the will extract the first 8 characters
in the first line of a text file and put that value in cell A1.
Extract characters 9 thru 14 in the first line and put that value in
cell B1. Then go to the last line in the file and extract characters 9
thru 14 and put that value in cell C1. Last I would like to run this
formula in cell D1 =C1-B1+1.
Some times I could have as many as 150 different file in my directory
so I would like the macro to do this for every file in my directory.

Sample Data:


FLEX764D1000751
FLEX764D1000752
FLEX764D1000753
FLEX764D1000754
FLEX764D1000755
FLEX764D1000756
FLEX764D1000757
FLEX764D1000758

Extraction would reurn

A B C D
FLEX764D1 000751 000758 8


Thank for any help..

 
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
Extract Data from Multiple Excel Files Steven Excel Discussion (Misc queries) 1 November 2nd 06 04:58 PM
Help extract numerous text files and how to use avg formula [email protected] Excel Worksheet Functions 0 May 16th 06 11:38 PM
GetValue to extract data from closed files John James[_3_] Excel Programming 2 April 8th 06 11:19 AM
extract text from html files Glowinafuse Excel Discussion (Misc queries) 3 May 31st 05 06:23 AM
Extract Text From Multiple Word Files andibevan Excel Programming 3 October 25th 04 05:30 PM


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

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

About Us

"It's about Microsoft Excel"