+ Reply to Thread
Results 1 to 8 of 8

Extract specific text from string of multiple Rows.

  1. #1
    Forum Contributor
    Join Date
    09-20-2014
    Location
    India
    MS-Off Ver
    2013
    Posts
    275

    Question Extract specific text from string of multiple Rows.

    Hi All,
    I have a string in below format

    "If you want to ge the information, SEE 123D 4567C IN Database".

    I want to extarct the text value (Its Alpha-Numeric) between "SEE" and "IN".

    Means, output must 123D 4567C.

    I have nearly 2000 rows, but all have the string in same format. Only Values between "SEE" and "IN" differ.

    Please help.
    Thanks.

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Extract specific text from string of multiple Rows.

    Try

    =MID(A1,FIND(" SEE ",A1)+5,SUM(FIND({" IN "," SEE "},A1)*{1,-1})-5)

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Extract specific text from string of multiple Rows.

    If you want to do this in a helper column with a formula...

    1. If the format of the data you want to extract is always teh same - 10 characters...
    =MID(A1,SEARCH("see",A1,1)+4,10)

    2. if the format is not always teh same...
    =MID(A1,SEARCH("see",A1,1)+4,(SEARCH(" IN ",A1,1))-(SEARCH("see",A1,1)+4))

    copied down
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Contributor
    Join Date
    09-20-2014
    Location
    India
    MS-Off Ver
    2013
    Posts
    275

    Re: Extract specific text from string of multiple Rows.

    =MID(A1,SEARCH("see",A1,1)+4,(SEARCH(" IN ",A1,1))-(SEARCH("see",A1,1)+4))
    works fine...
    Thanks a lot...

    Can it be not be done throught VBA..?

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Extract specific text from string of multiple Rows.

    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: VBA code required to Extract the content between 2 words/Phrases

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    08-15-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    349

    Re: Extract specific text from string of multiple Rows.

    Please click the * Add Reputation if this helps
    If solved remember to mark Thread as solved

    "I'm glad to help and this is not meant to sound smart, but either you have super-human vision to see all those controls cleared one by one with the code I posted, or your computer is really slow."

  8. #8
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Extract specific text from string of multiple Rows.

    thanks Blokeman.

    @ mchilapur
    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Extract specific numbers from a string of text
    By Galwaygirl13 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-19-2012, 03:22 PM
  2. Extract specific word from a text string
    By krjoshi in forum Excel General
    Replies: 10
    Last Post: 01-19-2012, 02:00 PM
  3. Replies: 11
    Last Post: 09-29-2011, 04:42 AM
  4. Replies: 5
    Last Post: 05-03-2011, 09:35 AM
  5. [SOLVED] Extract specific value from a long text string
    By Dinesh in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-10-2006, 11:30 PM

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