ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   OpenText Method with "StartRow" as a variable (https://www.excelbanter.com/excel-programming/397872-opentext-method-startrow-variable.html)

JingleRock

OpenText Method with "StartRow" as a variable
 
I need to parse a text file and paste the result in the active
workbook. I need "StartRow" to be the same row (a variable row
number) that contains the word "SALES" in the text file. Is this
possible?
TIA


Jim Cone

OpenText Method with "StartRow" as a variable
 

Suggest you use the Find method to determine the row.
It returns a range object so the row would be something like...
rngFound.Row
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)


"JingleRock"
wrote in message
I need to parse a text file and paste the result in the active
workbook. I need "StartRow" to be the same row (a variable row
number) that contains the word "SALES" in the text file. Is this
possible?
TIA


JingleRock

OpenText Method with "StartRow" as a variable
 
Jim,

Thanks very much for your advice.
I decided to junk the OpenText Method because I have a need to use 4
different "parsing rules" on my text file (I used 2 worksheets to
receive the parsed results). I ended up looping thru my text file and
using stmts such as:
Cells(Counter, 1).Value = "" & Mid(TextLine, 1, 8) to do my parsing.
But I did have a use for the Find Method when selecting certain
cells, and pasting them 2 columns to the right of the search column)
in the same row as the "Found" string. And its fast.

Thanks again,
Chuck





All times are GMT +1. The time now is 12:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com