Consulting

Results 1 to 4 of 4

Thread: Solved: read file with marker

  1. #1
    VBAX Regular kroz's Avatar
    Joined
    Sep 2010
    Posts
    74
    Location

    Solved: read file with marker

    Hey guys,

    I have a new issue for you.

    Can you read specific information from a text file? I know how to open and process info from a text file that has a fixed number of lines but doing the same thing for a file with a variable number of line doesn't look so easy.

    I have a text file with about 300k lines so i don't want to read it all - it will take forever. The info i need is between two keywords, 6 rows after the first and 4 rows above the second. I know this is a tricky request but i want the text between these two keywords to be used as input in my excel (with spaces between the columns).
    Since the file is so big, I was thinking about using Free File to read the info. But reading only specific info.. no idea how to do that.

  2. #2
    VBAX Regular kroz's Avatar
    Joined
    Sep 2010
    Posts
    74
    Location
    I found that the issue has been answered very recently, sorry to double post.

  3. #3
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Can you provide a link to the solution for the benefit of others who read this?
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  4. #4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •