+ Reply to Thread
Results 1 to 3 of 3

Want to extract text without class or element tags from a website into excel with VBA

  1. #1
    Registered User
    Join Date
    05-17-2013
    Location
    Florida, US
    MS-Off Ver
    Excel 2007
    Posts
    6

    Want to extract text without class or element tags from a website into excel with VBA

    I've watched a few VBA video tutorials explaining how to extract text from a website, but all of the examples showed webpage text that was associated with a specific class or element. However, I don't think this is the case here, where I want to have the script identify the text "It's a girl", and then put "F" (female) in a cell in a specific column. The following page source code is from the website: http://www.gpeters.com/names/baby-names.php?

    <td valign="top">
    <img border="0" src="images/woman2.jpg" align="right">
    <b>It's a girl!</b><p>Based on popular usage, it is <b>19.950 times more common</b> for <b>Anna</b> to be a girl's name.</p><p>The <b>popularity</b> of Anna is: <b>6.018</b> <br>(where 0 = extremely rare, 6 = super popular)</p>
    <p>Listing of some deceased famous people
    named Anna:<ul><li><a
    href="http://www.google.com/search?sourceid=navclient&ie=UTF-8&oe=UTF-8&q=&quot;the late great Anna Lee&quot;">Anna Lee</a>
    </li></ul></p>
    <table><tr><td>Names with similar statistics to Anna:</td></tr></table>

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Want to extract text without class or element tags from a website into excel with VBA

    Try something like this.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-17-2013
    Location
    Florida, US
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Want to extract text without class or element tags from a website into excel with VBA

    Thanks, Alpha. I'll try that!

+ 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