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: 2
Default Parsing a Text File

Good Evening,

I wonder if somebody could point me in the right direction with a query
I have?

I have a macro that currently parses a file looking for certain text
and when it finds it copies the string to a given cell in an Excel
file.

I need to adapt this to now look for the line that contains a certain
string of text and then import the following line of text to the cell
in Excel (where I can then manipulate it using text to columns).

Could someone please gie me a hint on how to accomplish this?

My code that needs altering is:

Open FName For Input As Fnum
i = 1

Do While Not EOF(Fnum)
If InStr(1, sLine, "NUE00001 GRAND TOTALS", vbTextCompare) 0 Then

' This is the bit I need to change to import the line following the
matching row....

Cells(3, 3).Value = sLine

End If


Thanks in advance,

Richard

 
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
Pause Macro For Start Row While Parsing a Text File Bill Foster[_2_] Excel Programming 2 November 9th 05 08:47 PM
Parsing a text file to a excel or word form Johndeerrm Excel Programming 1 August 7th 05 09:52 PM
Issue with parsing text file into worksheet primrose Excel Programming 1 May 25th 05 05:09 PM
VBA Import of text file & Array parsing of that data Dennis Excel Discussion (Misc queries) 4 November 28th 04 10:20 PM
Parsing imported text file with macro... help! scrupul0us[_2_] Excel Programming 0 September 7th 04 10:13 PM


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