+ Reply to Thread
Results 1 to 3 of 3

Macro to extract strings between key words

  1. #1
    Registered User
    Join Date
    05-10-2013
    Location
    Belfast
    MS-Off Ver
    Excel 2010
    Posts
    2

    Macro to extract strings between key words

    Hello smart people! I am total newbie when it comes to VBA and having extra big difficulty in writing up macro for multiple string extraction.

    What I have is a long paragraph, which starts with same word – “Start” then I have repeating key words “Middle”, “Remains” and "Analysis".

    I need to extract stings between these 4 words into 4 separate columns and making sure that all text after “Remains” to "Analysis" is just extracted but not checked further for key words, and just extract string appearing after "Analysis" without checking for further key words - just go to next line (as text after “Remains” is very long and might include key words – so don’t want it to be checked, same goes for text after "Analysis" key word).

    Any help would be much appreciated!

    Also please see screen shot for sample data, I use Excel formulas at the moment, but would prefer to have macro for this.... Screen Shot 2013-05-10 at 2.49.30 PM.png
    Last edited by aillil; 05-10-2013 at 09:53 AM.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Macro to extract strings between key words

    Can you post some sample data and the results you want to see, based on that data?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    05-10-2013
    Location
    Belfast
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Macro to extract strings between key words

    Screen Shot 2013-05-10 at 2.49.30 PM.png

    Hello Ron,
    Thank you for replying and showing interest in helping me out
    I have attached screen shot of sample data. Basically at the moment I am using excel formulas, but I would like to have macro for it instead....

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1