Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error Help - Method "Range" of object "_Worksheet" failed. | Excel Programming | |||
What is Error "Method "Paste" of object "_Worksheet" failed? | Excel Programming | |||
use variable in Workbooks("book1").Worksheets("sheet1").Range("a1" | Excel Programming | |||
Workbooks.OpenText StartRow:=2 Not Skipping Row 1 | Excel Programming | |||
Getting "compile error" "method or data member not found" on reinstall | Excel Programming |