+ Reply to Thread
Results 1 to 4 of 4

Auto update NBA standings

  1. #1
    Registered User
    Join Date
    10-18-2018
    Location
    San Diego
    MS-Off Ver
    2010
    Posts
    2

    Auto update NBA standings

    Hi there,

    I’m trying to setup an excel sheet where it will update the NBA standings automatically using the “Get External Data” technique from the ESPN website or somewhere else.
    How do I type out the formula to use in retrieving the wins and losses?
    At the same time, I don’t need the team names to move around as the standings change, I want them to stay in the order I have them in…. So this is the tricky part… Because the data I retrieve from the website WILL move around as the standings change… So, the excel formula have to put that into consideration..

    Can someone help me figure this out? I’ve been at this for hours already and can’t figure it out….
    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Auto update NBA standings

    I wouldn't recommend "Get External Data" method in this case.

    Since most Sports stats site use Script/API to fill the data on the site. You won't able to get at it, without simulating/navigating IE or some other browser from URL.

    Of few sites I looked, NBA.com is easiest to scrape.

    Use following URL: https://data.nba.net/prod/v1/current...onference.json

    This will get you json response with win/loss stats. However, teams are identified by internal ID instead of names...
    So you will need to use another URL to find out: https://data.nba.net/prod/v2/2018/teams.json

    Use WEBSERVICE function to get response from URL.

    Now it's just matter of using text manipulation to extract the desired data.

    I stored WEBSERVICE formula for stats in G5 and manually filled team IDs in Column C, Win/Loss has moved to D & E.

    Win formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Loss formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Only difference is SUBSTITUTE(String,":",Instance) part, and only instance argument is changed.

    See attached sample.

    Edit: Since you have Excel 2010, you won't have this function available out of the box. I'd add following UDF and replace WEBSERVICE function with WebService2 and save workbook as macro enabled workbook.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by CK76; 10-18-2018 at 03:22 PM.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Registered User
    Join Date
    10-18-2018
    Location
    San Diego
    MS-Off Ver
    2010
    Posts
    2

    Re: Auto update NBA standings

    Thanks man! But is there any way I can move this to another workbook? I'm having trouble making this work on another workbook... I seem to have added the UDF module now, and copied your weblink in G5 to the other workbook, but it still just shows #NAME? after I press enter....

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Auto update NBA standings

    Try this one. I've replaced WEBSERVICE with UDF.

    Open VBE and you can see where it's stored.
    Attached Files Attached Files

+ 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. [SOLVED] Need a formula to auto calculate NFL Wins Pool Standings
    By Jnehra in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-12-2017, 01:22 PM
  2. Replies: 1
    Last Post: 02-25-2017, 04:16 PM
  3. Auto Rank Standings
    By socal.s in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-27-2015, 03:44 PM
  4. Replies: 1
    Last Post: 11-19-2013, 05:09 AM
  5. Macro to update tournament standings
    By jakevr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-12-2012, 11:56 PM
  6. Standings auto sort problem
    By mb1845 in forum Excel General
    Replies: 5
    Last Post: 02-28-2012, 01:58 PM
  7. Auto Updating Standings
    By XRunner in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-31-2010, 08:56 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