+ Reply to Thread
Results 1 to 5 of 5

how to pull out a string a text in between of 2 other strings of text

  1. #1
    Forum Contributor
    Join Date
    01-14-2011
    Location
    New York City, USA
    MS-Off Ver
    Excel 2010
    Posts
    194

    how to pull out a string a text in between of 2 other strings of text

    Hey guys,

    Could you provide some help with regards to how to pull out a string a text in between of 2 other strings of text. The two strings on either side are always the same.

    For example: www.myurl.com/textleftside=ABCDE&textrightside=blah

    I'm interested in pulling out the ABCDE which is in between textleftside and textrightside. I just can't remember the formula.


    Thanks
    Last edited by SEMMatt; 08-28-2012 at 10:53 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: how to pull out a string a text in between of 2 other strings of text

    If the = and & are consistently before and after then easier to use:

    =MID(A2,FIND("=",A2)+1,FIND("&",A2)-FIND("=",A2)-1)

    since the textleftside/rightside may be variable...
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: how to pull out a string a text in between of 2 other strings of text

    have you got a real string what character is immediately before and after the text you want to parse?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: how to pull out a string a text in between of 2 other strings of text

    Try this

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    ---------- Post added at 10:31 AM ---------- Previous post was at 10:30 AM ----------

    Beat me to it
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  5. #5
    Forum Contributor
    Join Date
    01-14-2011
    Location
    New York City, USA
    MS-Off Ver
    Excel 2010
    Posts
    194

    Re: how to pull out a string a text in between of 2 other strings of text

    NBVC that worked great - thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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