Consulting

Results 1 to 5 of 5

Thread: Copy text from text file between keyword in rows.

  1. #1
    VBAX Regular
    Joined
    Feb 2022
    Posts
    24
    Location

    Copy text from text file between keyword in rows.

    I have a text file and I want to copy all text/numbers/special characters whatever is there between the keyword (". keyword:" and ". keyword:")
    Each row cell data must have the first line where the keyword ". keyword:", appears but exclude that (keyword: ". keyword:" ) in last line because next file data will start from there. The last line of the file do not have a keyword. the sample txt file is zipped and excel file has the example output.
    Attached Files Attached Files

  2. #2
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,058
    Location
    How is this different (other than a better presentation) from the other version you asked?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  3. #3
    you run getTextContent() from Module1.
    Attached Files Attached Files

  4. #4
    VBAX Regular
    Joined
    Feb 2022
    Posts
    24
    Location
    Thank you. The VBA works great.
    But I need the output in excel file same as in text file. Please check the Row 3 and 4 data (first two short lines should be together as in the text file).

    Quote Originally Posted by arnelgp View Post
    you run getTextContent() from Module1.

  5. #5
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,058
    Location
    Awaiting a response from the OP.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

Tags for this Thread

Posting Permissions

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