Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 866
Default Processing input data

I am importing a text file on a line by line basis and want to modify the
file as it is being imported. Presently it is importing in delimited format
style and want to switch over to a fixed width style and also process the
data as it is imported.

Here is what I have:

'Set The Counter to 1
Counter = 1
'Loop Until the End Of File Is Reached
Do While Seek(FileNum) <= LOF(FileNum)
'Store One Line Of Text From File To Variable
Line Input #FileNum, ResultStr
'Store Variable Data Into Active Cell
If Left(ResultStr, 1) = "=" Then
ActiveCell.Value = "'" & ResultStr
Else
ActiveCell.Value = ResultStr --- when counter =7 want to
process data
End If
'Increment the Counter By 1
Counter = Counter + 1
'Start Again At Top Of 'Do While' Statement
Loop
'Close The Open Text File
Close
'Remove Message From Status Bar
Application.StatusBar = False
End Sub

Want to have the data imported in a Fixed width format and also then run
additional macros based on the value of the data.


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
Processing Data dan Excel Worksheet Functions 0 August 13th 06 02:33 AM
data processing Youyou Excel Discussion (Misc queries) 1 November 19th 05 10:42 AM
Input Box Processing troubles Sandy[_6_] Excel Programming 4 July 3rd 05 08:16 PM
Data Processing Sedat Excel Programming 0 September 29th 03 05:22 PM
Data Processing Hande & Tolga[_2_] Excel Programming 1 September 16th 03 08:58 PM


All times are GMT +1. The time now is 04:30 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"