+ Reply to Thread
Results 1 to 5 of 5

Capture Query String From URL

  1. #1
    Registered User
    Join Date
    11-02-2017
    Location
    Sydney
    MS-Off Ver
    365
    Posts
    2

    Capture Query String From URL

    Hi Guys,

    Long time reader, first time poster...

    I was wondering if someone could help with an issue I am having. I can't seem to capture the query string from the parameter utm_content="value" - I would like to return the value using a search function however I can't get anything to work.

    String is here:

    utm_source=FACEBOOK&utm_medium=SOCIAL&utm_content=PAID-F1-IMAGE-AUSTRIA&utm_campaign=ACQUISITION-PROSPECTING&sport=formula-one

    I would like to return the value in bold exclusively in a cell.

    Thanks,

    Bigscreentv1984

  2. #2
    Forum Guru Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Capture Query String From URL

    You could use a formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Or a small vba user defined function:
    Please Login or Register  to view this content.
    Used as:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: Capture Query String From URL

    you can do this assuming your string is in A1

    Please Login or Register  to view this content.
    its ugly as hell but it will pull out the string between utm_content= and &utm this assumes that the strings always follow this principle.........


    edit:
    the VBA above is better option btw. and looks like above poster has it covered.
    The Importance of INDEX - A GUIDE TO INDEX'S OTHER USES
    <--- If a post helps hit the star

  4. #4
    Registered User
    Join Date
    11-02-2017
    Location
    Sydney
    MS-Off Ver
    365
    Posts
    2

    Re: Capture Query String From URL

    Awesome - this formula works great!

  5. #5
    Forum Guru Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Capture Query String From URL

    Which solution did you end up using?

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. You can also 'Add Reputation' to those who helped you. Thanks.

+ 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. Capture Left and Right string from the Delimiter
    By HB07 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-07-2015, 06:20 AM
  2. How do I capture Numbers Embedded in a String
    By scrags in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-13-2012, 08:56 PM
  3. capture browseforfolder in string
    By edjohns in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-29-2012, 01:32 PM
  4. [SOLVED] Need to capture a specific string of characters
    By saccer in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-24-2012, 01:10 AM
  5. Capture Only Numbers in a string
    By bconner in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-20-2008, 07:36 AM
  6. Capture right text string
    By andyp161 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-16-2007, 08:39 AM
  7. [SOLVED] Capture Date when Query Refreshed
    By FrankTimJr in forum Excel General
    Replies: 0
    Last Post: 01-28-2005, 11:06 AM

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