+ Reply to Thread
Results 1 to 5 of 5

Parsing a URL

  1. #1
    Registered User
    Join Date
    08-24-2010
    Location
    LA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Smile Parsing a URL

    Hi there,

    This is my first post, so don't flame me for breaking any rules. I can't figure out how to parse a URL in Excel. I have columns with URLs, some with www and some without. Example:

    http://www.example.com/index.php?xyz
    http://example2.com/category/xyz/post.aspx?index=0

    I'm trying to extract just the domain name. So for the above examples I would like:

    example.com
    example2.com

    I tried the LEFT and MID functions but they only allow me to choose the number of characters and not a delimiter like /.

    I'm pretty sure you have to use VBA, but I'm pretty green when it comes to programming. Any help would be appreciated. Thanks in advance.
    Last edited by webrocky; 08-25-2010 at 08:35 PM.
    How do I get to the top position on Google?
    Hire a professional seo company.

  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: Parsing a URL

    Try this
    Please Login or Register  to view this content.

    Hope this helps
    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
    Registered User
    Join Date
    08-24-2010
    Location
    LA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Parsing a URL

    Thanks for the reply. Wow, that was the biggest nested statement I've ever seen! I tried it and it just evaluated to blank. There wasn't any error though, so I'm not sure why it doesn't work.

  4. #4
    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: Parsing a URL

    Doubtless there is a more elegant solution, but it seems to work for me.
    See the demo workbook attached

    Add a URL to Column A, then drag/fill the formula in Column B down,

    Hope this helps.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-24-2010
    Location
    LA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Parsing a URL

    Thanks the formula in the excel sheet worked great!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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