+ Reply to Thread
Results 1 to 4 of 4

Querying tables from a website from a column of hyperlinks

  1. #1
    Registered User
    Join Date
    06-26-2012
    Location
    Michigan, USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Querying tables from a website from a column of hyperlinks

    I am attempting to find a way to query a baseball player's minor league statistics from a website with tables. Basically, I want excel to go to a hyperlink, copy the tables, and paste them into a new worksheet named after the player. Some of these players do not have data yet, though it should be added eventually.

    For example, in the attached spreadsheet, I would like to get the data from the hyperlink in cell F14, which corresponds to "Danny Poma" (cell E14) Then, I would like to copy the table "Minors Batting" from Baseball Reference into a new sheet called "Danny Poma." Then, when re-running the macro in the future, I want these tables to update as the player's season continues.

    I feel like a macro would be the best way to do this, though my VBA skills are lackluster to say the least. Any help would be greatly appreciated. Thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Querying tables from a website from a column of hyperlinks

    This macro should do it... along with a hidden "Template" sheet I added to your workbook that serves as a design target for creating new sheets. The macro uses the Names in column E and the links in column F:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    06-26-2012
    Location
    Michigan, USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Querying tables from a website from a column of hyperlinks

    Thank you so much. This is exactly what I was looking for.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Querying tables from a website from a column of hyperlinks

    If that takes care of your need, please select Thread Tools from menu above and set this topic to SOLVED.

+ 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