+ Reply to Thread
Results 1 to 6 of 6

Help with a formula to extract text

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

    Help with a formula to extract text

    Could anyone help me with a formula to extract the words Text Link which occurs after umedium=. It's always going to be surrounded by umedium= and &


    ?WT.mc_id=ABCD4567&source=ABCD4567&umedium=Text Link&uadpub=pub&ucreative=creative Link&ucampaign=my_campaign


    Thanks,
    Last edited by SEMMatt; 10-23-2012 at 10:50 AM.

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Help with a formula to extract text

    One way with your string in A2
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

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

    Re: Help with a formula to extract text

    Try:

    =LEFT(MID(A2,FIND("umedium=",A2)+8,255),FIND("&",MID(A2,FIND("umedium=",A2)+8,255))-1)

    assuming text in A2.
    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.

  4. #4
    Forum Contributor johnjohns's Avatar
    Join Date
    11-19-2007
    Location
    Dubai, UAE
    MS-Off Ver
    2003 and 2007
    Posts
    526

    Re: Help with a formula to extract text

    perhaps

    Please Login or Register  to view this content.


    Sorry!i Mine is the wrong answer! I did not read the post fully! Apologies!
    Last edited by johnjohns; 10-23-2012 at 10:02 AM.
    regards

    johnjohns

    When you are not sure where to go, every road takes you there!

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Help with a formula to extract text

    Another way with your string in A2
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Note that my first post is the same as NBVC, only I used LEN("umedium=") instead of the fixed value 8, there is no problem either way.
    Just thought LEN("umedium=") might help to explain where 8 is derived from.

  6. #6
    Registered User
    Join Date
    10-02-2012
    Location
    Baku
    MS-Off Ver
    Excel 2010
    Posts
    273

    Re: Help with a formula to extract text

    I know its too late, but just for fun,
    =MID(A1,FIND("umedium=",A1,1)+8,FIND("&",A1,FIND("umedium=",A1,1))-FIND("umedium=",A1,1)-8)

+ 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