+ Reply to Thread
Results 1 to 12 of 12

premier league football predictor - unable to calculate draws / include form

  1. #1
    Registered User
    Join Date
    06-18-2018
    Location
    Wakefield
    MS-Off Ver
    Excel 2016
    Posts
    4

    premier league football predictor - unable to calculate draws / include form

    I’ve been looking to put together a premier league score predictor so that myself and some colleagues at work can predict the score on a weekly basis.

    Everything (seems) to work however I was wanting to put a premier league table as an extra sheet (which I can then go and use to formulate tables based on our predictions similar to what happens on the BBC sport website)

    Everything is working except for the ‘Draw’ part Columns ‘Q’ and ‘Y’ on the ‘Home and Away’ Sheet

    I did have the formula

    =SUMPRODUCT((Fixtures!$B$2:$B$600=$B5)*(Fixtures!$H$2:$H$600=Fixtures!$J$2:$J$600)*(Fixtures!$H$2:$H$600<>””))

    However this just returns an error. Changing the “” to ‘)’ fixes it but I still get an issue where if the draw is 0-0 then it is not registered.

    I have uploaded the spreadsheet, also if anyone would like to use this then feel free.

    But would someone be able to take a look and advise where I have gone wrong / how the formula should read.

    As an addition could anyone advise how I could add a ‘form’ section that shows what each team has done in there last 5 matches? This would be added from column K on the 'PL Table' Sheet

    Many thanks
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,730

    Re: premier league football predictor - unable to calculate draws / include form

    Welcome to the forum.

    Try this:

    =SUMPRODUCT((Fixtures!$B$2:$B$600=$B5)*(Fixtures!$H$2:$H$600=Fixtures!$J$2:$J$600)*(Fixtures!$H$2:$H$600<>""))

    Notice you need STRAIGHT QUOTES. *

    As an addition could anyone advise how I could add a ‘form’ section that shows what each team has done in there last 5 matches?
    Please mock up what you mean for a few teams.

    * Note that if you are working on an iPad, then you need to press the " key and select the straight quote option from the popup - just pressing the key will insert slanter quotes.
    Last edited by AliGW; 08-27-2019 at 08:11 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,730

    Re: premier league football predictor - unable to calculate draws / include form

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  4. #4
    Registered User
    Join Date
    06-18-2018
    Location
    Wakefield
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: premier league football predictor - unable to calculate draws / include form

    Hi, thank you so much that worked great

    What i mean by form is, if you look at the PL Table sheet in cells K-O for example is there anyway of having a W, L or a D for win lose of draw depending on what happened in the teams last five matches.
    Attached Files Attached Files

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,730

    Re: premier league football predictor - unable to calculate draws / include form

    What does this mean?

    Excel 2016 (Windows) 32 bit
    K
    L
    M
    N
    O
    4
    Last 5 Games
    5
    W W W
    6
    W D W
    7
    W W L
    Sheet: PL Table

    Are the games in ascending or descending order from left to right?

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,730

    Re: premier league football predictor - unable to calculate draws / include form

    And can we add helper columns (that could be hidden) to the fixtures sheet to facilitate this?

  7. #7
    Registered User
    Join Date
    06-18-2018
    Location
    Wakefield
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: premier league football predictor - unable to calculate draws / include form

    Hi, That wouldnt be an issue to add those columns in.

    The way the PL table sheet is set out is that K4:O4 are merged to become K4 just with a title of 'last 5 games' Then the Cells K4,L4,M4,N4,O4 have W/D/L in them with the furthest right column being the oldest result I.E after five games K4 is updated with the newest result pushing the rest to the right, If that makes sense.

  8. #8
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: premier league football predictor - unable to calculate draws / include form

    There might be an easier way, but where's the fun in that? Try the following formula in K5. It must be array-entered (confirm with Ctrl + Shift + Enter instead of the regular Enter), then filled right through O5 and down through the bottom of the table.

    =IFERROR(IF($B5=INDEX(Fixtures!$B$6:$B$541,LARGE(IF(((Fixtures!$B$6:$B$541=$B5)+(Fixtures!$F$6:$F$541=$B5))*(Fixtures!$H$6:$H$541 < > "")=1,ROW(Fixtures!$B$6:$B$541)-ROW(Fixtures!$B$6)+1),COLUMN(A:A))),IF(INDEX(Fixtures!$H$6:$H$541,LARGE(IF(((Fixtures!$B$6:$B$541=$B5)+(Fixtures!$F$6:$F$541=$B5))*(Fixtures!$H$6:$H$541 < > "")=1,ROW(Fixtures!$B$6:$B$541)-ROW(Fixtures!$B$6)+1),COLUMN(A:A))) > INDEX(Fixtures!$J$6:$J$541,LARGE(IF(((Fixtures!$B$6:$B$541=$B5)+(Fixtures!$F$6:$F$541=$B5))*(Fixtures!$H$6:$H$541 < > "")=1,ROW(Fixtures!$B$6:$B$541)-ROW(Fixtures!$B$6)+1),COLUMN(A:A))),"W",IF(INDEX(Fixtures!$H$6:$H$541,LARGE(IF(((Fixtures!$B$6:$B$541=$B5)+(Fixtures!$F$6:$F$541=$B5))*(Fixtures!$H$6:$H$541 < > "")=1,ROW(Fixtures!$B$6:$B$541)-ROW(Fixtures!$B$6)+1),COLUMN(A:A))) < INDEX(Fixtures!$J$6:$J$541,LARGE(IF(((Fixtures!$B$6:$B$541=$B5)+(Fixtures!$F$6:$F$541=$B5))*(Fixtures!$H$6:$H$541 < >"")=1,ROW(Fixtures!$B$6:$B$541)-ROW(Fixtures!$B$6)+1),COLUMN(A:A))),"L","D")),IF(INDEX(Fixtures!$H$6:$H$541,LARGE(IF(((Fixtures!$B$6:$B$541=$B5)+(Fixtures!$F$6:$F$541=$B5))*(Fixtures!$H$6:$H$541 < >"")=1,ROW(Fixtures!$B$6:$B$541)-ROW(Fixtures!$B$6)+1),COLUMN(A:A))) > INDEX(Fixtures!$J$6:$J$541,LARGE(IF(((Fixtures!$B$6:$B$541=$B5)+(Fixtures!$F$6:$F$541=$B5))*(Fixtures!$H$6:$H$541 < > "")=1,ROW(Fixtures!$B$6:$B$541)-ROW(Fixtures!$B$6)+1),COLUMN(A:A))),"L",IF(INDEX(Fixtures!$H$6:$H$541,LARGE(IF(((Fixtures!$B$6:$B$541=$B5)+(Fixtures!$F$6:$F$541=$B5))*(Fixtures!$H$6:$H$541 < > "")=1,ROW(Fixtures!$B$6:$B$541)-ROW(Fixtures!$B$6)+1),COLUMN(A:A))) < INDEX(Fixtures!$J$6:$J$541,LARGE(IF(((Fixtures!$B$6:$B$541=$B5)+(Fixtures!$F$6:$F$541=$B5))*(Fixtures!$H$6:$H$541 < > "")=1,ROW(Fixtures!$B$6:$B$541)-ROW(Fixtures!$B$6)+1),COLUMN(A:A))),"W","D"))),"")
    Last edited by CAntosh; 08-28-2019 at 09:54 AM. Reason: can't type...
    If your problem has been solved, please use "Thread Tools" to mark the thread as "Solved".

    If you're grateful for this site's existence and would like to contribute to the community, please consider posting something hilarious in our joke thread:
    https://www.excelforum.com/the-water...ke-thread.html

  9. #9
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: premier league football predictor - unable to calculate draws / include form

    I had to put some spaces in the formula above to dodge our firewall, so maybe just pull the formula from the attachment:
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    06-18-2018
    Location
    Wakefield
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: premier league football predictor - unable to calculate draws / include form

    Oh my word, that works, thank you so much for your help with this it really is appreciated. and hopefully it helps someone else looking for the same answer.


  11. #11
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: premier league football predictor - unable to calculate draws / include form

    Glad to help, good luck!

  12. #12
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: premier league football predictor - unable to calculate draws / include form

    You should also change your ranking formula on Home & Away to cater for ties and not get the #N/A that you are getting on PL Table, something like

    =RANK(G5,$G$5:$G$24,1)+COUNTIF($G$5:$G5,G5)-1

+ 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. DFS Football Predictor Model
    By jester2itrfe in forum Excel General
    Replies: 1
    Last Post: 09-22-2015, 08:34 PM
  2. Football Predictor
    By EMcK in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-27-2014, 08:17 PM
  3. Replies: 3
    Last Post: 09-18-2012, 09:50 AM
  4. Replies: 9
    Last Post: 01-02-2012, 04:08 AM
  5. Favourite English Premier League Teams
    By inayat in forum The Water Cooler
    Replies: 20
    Last Post: 09-20-2011, 04:28 AM
  6. Football League Predictor Workbook
    By oliverhj in forum Excel General
    Replies: 5
    Last Post: 08-17-2010, 10:27 AM
  7. Premier League Stats
    By gbWildy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-17-2007, 02:18 PM

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