+ Reply to Thread
Results 1 to 6 of 6

Extract URL's from a text cell

  1. #1
    Registered User
    Join Date
    11-03-2012
    Location
    Uk
    MS-Off Ver
    Excel 2010
    Posts
    3

    Extract URL's from a text cell

    Hi there,

    I'm having trouble figuring out how to extract a URL from a cell in Excel 2010

    I have a list of cells, each containing a URL which appears at different positions in each cell. An example is below:

    Please Login or Register  to view this content.
    I want to extract the URL into a cell opposite the original cell so I would end up with


    Please Login or Register  to view this content.
    I want to be able to replicate the formula so it finds the URL regardless of the position it sits in the cell.

    I think it can be done through some combination of "=mid" and "=search" but I can't get it to work.

    Can anyone help me?

    Many thanks in advance.
    Last edited by euanb21; 11-03-2012 at 10:13 AM.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Extract URL's from a text cell

    First copy the value to column B

    On the data in column B

    Cntr+H
    *http
    http

    CNTRL+H
    /*
    leave empty

    What Tumblr tells us about the future of the media http://t.co/vrescovT /@thewalluk http://t.co/vrescovT


    See the attached file.
    Attached Files Attached Files
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    11-03-2012
    Location
    Uk
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Extract URL's from a text cell

    Hi oeldere; thanks for the help - I hadn't thought of using find and replace.

    I still cant get that to work - the first Find/Replace leaves me with

    Please Login or Register  to view this content.
    But then using "/*" and leaving the second field empty leaves me with:

    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Extract URL's from a text cell

    Please Login or Register  to view this content.
    But then using "/*" and leaving the second field empty leaves me with:

    It has to be GAP/*

    See my earlier posted example.

    " /*"

  5. #5
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Extract URL's from a text cell

    if you want to solve this using a formula, try the following in B1 (with your input string in A1):

    Please Login or Register  to view this content.
    this formula assumes that you need to extract the string that starts with HTTP and ends with a white space (" ").

    so, with input string - What Tumblr tells us about the future of the media http://t.co/vrescovT /@thewalluk - the output would be - http://t.co/vrescovT.
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  6. #6
    Registered User
    Join Date
    11-03-2012
    Location
    Uk
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Extract URL's from a text cell

    oeldere, thanks, that works and is really simple once I realised there was a space in the example.

    icestationzbra, thanks as well; I'd really wanted to use a formula and de-construct it to understand how it worked.

    Both methods work equally well. 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