+ Reply to Thread
Results 1 to 16 of 16

Baseball Fixtures, Results and League Table

  1. #1
    Forum Contributor
    Join Date
    06-07-2018
    Location
    Newcastle Upon Tyne, England
    MS-Off Ver
    365
    Posts
    143

    Baseball Fixtures, Results and League Table

    Hello,

    I have created a spreadsheet that I am hoping to help support my brothers Baseball team. It includes fixtures for the full season, results so far and a league table for each of the 3 divisions.

    So far I have managed to work out the COUNTIFS formulas for some of the league table but after trying everything possible from my own Excel knowledge, I am now asking for some support to finally get this finished at put to use.

    Auto sort - I would love a formula, macro, code or whatever is needed to auto sort the league table positions based on the results that are entered onto the Fixtures and Results tab.

    GB - Games Behind is a tricky one to explain but it is basically the Baseball version of Points and how you know which team is 1st, 2nd, 3rd etc. For whatever reason, when I tried to use the correct formula to work out the GB it only worked hosting the formula on a separate sheet (References) and then just referencing the cell on the League Table.

    L10 - Just a W/L streak from last 10 games e.g. "W10 - L4"

    STK - Current streak. This must actuall be a streak so can't be a combination of wins and losses. Must be whatever their current streak is before the chain is broken, i.e. W4, L1, W7, L4 etc.

    Last Game - Previous fixture with result.

    Next Game - Next fixture.

    I have attached the document for any of you experts to have a go and any help would be hugely appreciated! I have also attached an image of the MLB League Table so you can see examples of the missing fields.

    Much appreciated!
    Craig
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Baseball Fixtures, Results and League Table

    I assume that you want to sort each division (AAA, AA, A) internal to itself for standings. The convention is to show % won as a decimal with three digits (i.e., if a team is 5/5, then their pct is .500). You can see that in the image you posted above. This is also the sort key for standings.

    Games Behind is a metric to show how far teams trail behind the first place team. GB is how many games the trailing team would have to beat the first place team to tie for first place. Suppose that the first place team is 6-4, and the second place team is 4-6. If the two teams played each other, the second team would have to win two games for the two teams to tie at 6-6, so they are two games behind. (There is a formula, which can produce 1/2 game behind depending on the differences between wins and losses for the two teams.)

    What does "P" mean in your game results?

    I notice that this is a .xslm file but there is no code. You will need code for the automatic sorting.

    You are asking for a lot here and most of us have limited time so not sure how long it will take to get to all of this.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Baseball Fixtures, Results and League Table

    This fixes your GB, removes References, and adds PCT. I don't know why you had trouble calculating GB on the primary sheet.
    Attached Files Attached Files

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Baseball Fixtures, Results and League Table

    BTW I had now idea that baseball had any popularity in England.

    Here is the auto sort, which is done each time the Fixtures and Results sheet is updated.

    Given the way your data is organized I'm not sure how to calculate the streak and L10.

    Looks like you got your MLB example from a beer web site. Here is what it typically looks like in a newspaper:

    mlb.JPG
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    06-07-2018
    Location
    Newcastle Upon Tyne, England
    MS-Off Ver
    365
    Posts
    143

    Re: Baseball Fixtures, Results and League Table

    Thanks for you help,

    I appreciate everyone's input is in kind and I certainly didn't expect someone to just pick it up and finish it for me.

    I just thought people would comment with suggestions to try for various parts.

    I'm new to this forum as of today so wasn't sure what's usually posted etc.

    Cheers again!

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Baseball Fixtures, Results and League Table

    Well I like baseball so I was interested in this project

    But what does P mean for a score? Postponed game?

  7. #7
    Forum Contributor
    Join Date
    06-07-2018
    Location
    Newcastle Upon Tyne, England
    MS-Off Ver
    365
    Posts
    143

    Re: Baseball Fixtures, Results and League Table

    Yeh the P means the game was rained off basically. My brother has set a team up in Newcastle and they will be joining the A Division next season. How did you manage to get the auto sort to work?

    I know the STK and L10 is going to be a struggle but is the Last Game and Next Game possible do you think? My family are big St. Louis fans but my sport is Ice Hockey. We're basically fake Americans lol...

    Thanks again for your help with this

  8. #8
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Baseball Fixtures, Results and League Table

    The autosort is implemented in VBA code.

    I also added two functions that return the last game results, and next game scheduled. See attached.
    Attached Files Attached Files

  9. #9
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Baseball Fixtures, Results and League Table

    Quote Originally Posted by davo3286 View Post
    ...my sport is Ice Hockey.
    I will be watching my team, the Washington Capitals, play for the Stanley Cup tonight against Las Vegas. Caps lead 3-1 so they could win the championship tonight.

  10. #10
    Forum Contributor
    Join Date
    06-07-2018
    Location
    Newcastle Upon Tyne, England
    MS-Off Ver
    365
    Posts
    143

    Re: Baseball Fixtures, Results and League Table

    I really do appreciate your help on this a great deal!.. You will also be glad to hear that I am a HUGE Pens fan so you have well and truly crushed our hopes of a 3rd consecutive title!... I would usually support the team who knocked us out so it doesn't look so bad but Fleury, Neal, Engelland etc. makes it hard for me not to support the Knights!...

  11. #11
    Forum Contributor
    Join Date
    06-07-2018
    Location
    Newcastle Upon Tyne, England
    MS-Off Ver
    365
    Posts
    143

    Re: Baseball Fixtures, Results and League Table

    Well, congratulations on the big W last night!!!... Gutted for Fluery but very well deserved to the Caps!

    Final question from me...

    Is it possible to use a macro button to export the league table as a JPEG? I know how to do this as a PDF:
    Please Login or Register  to view this content.
    Cheers as always!
    Last edited by 6StringJazzer; 06-08-2018 at 12:35 PM. Reason: code tags

  12. #12
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Baseball Fixtures, Results and League Table

    I think this update covers everything. I ended up solving everything with macros. It might be possible with formulas.

    This code will export a JPG of your standings:

    Please Login or Register  to view this content.

  13. #13
    Forum Contributor
    Join Date
    06-07-2018
    Location
    Newcastle Upon Tyne, England
    MS-Off Ver
    365
    Posts
    143

    Re: Baseball Fixtures, Results and League Table

    Here's the very nearly finished version with the exception of:

    JPEG export not working (could be my computer at fault).
    The 'Last Game' doesn't appear to be giving correct information because it has a result from AAA vs. A which doesn't happen in this league
    I have added some conditional formatting to the 'Fixtures and Results' tab and updated the coding to replicate the new cell layout and everything that was working before I moved the cells around now seems to be back working again.

    Really happy with this now, cheers!
    Attached Files Attached Files

  14. #14
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Baseball Fixtures, Results and League Table

    I'm looking at the JPEG export, not sure yet what's wrong.

    You have a lot of interleague games marked as "IL". For example, in row 124 of Fixtures and Results you have AAA vs A:

    6/10/2018 10 IL 2 Manchester A's - - - Robots of Doom


    You can't attach files to a PM, just keep using this thread.

  15. #15
    Forum Contributor
    Join Date
    06-07-2018
    Location
    Newcastle Upon Tyne, England
    MS-Off Ver
    365
    Posts
    143

    Re: Baseball Fixtures, Results and League Table

    Afternoon,

    JPEG Export Fix:
    Please Login or Register  to view this content.
    *ONLY ISSUE WITH THIS CODE IS THAT THERE IS NO SELECTED PATH AND SAVES TO DEFAULT LOCATION

    Here is how the export looks:
    Attached Images Attached Images
    Last edited by 6StringJazzer; 06-11-2018 at 12:59 PM.

  16. #16
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Baseball Fixtures, Results and League Table

    Note: We require code tags for code. I added them for you because you are new.

    There are two ways to add code tags. One is to select the code part of the text so it is highlighted, then press the "#" button in the edit controls. The other is to simply type in the tags:

    [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code]

+ 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. Replies: 3
    Last Post: 02-17-2016, 10:04 AM
  2. Little League Baseball help
    By Shakar in forum Excel General
    Replies: 2
    Last Post: 05-13-2015, 12:41 PM
  3. Adult baseball league schedule
    By rewster in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-11-2013, 02:15 PM
  4. Setting up a baseball league draft
    By jerry512 in forum Excel General
    Replies: 1
    Last Post: 03-01-2012, 05:53 PM
  5. Football fixtures and league creator
    By richardvilla in forum Excel General
    Replies: 2
    Last Post: 07-18-2009, 08:48 AM
  6. league table from results
    By sandy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-25-2005, 03:05 PM

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