+ Reply to Thread
Results 1 to 14 of 14

Football Prediction help!!

  1. #1
    Registered User
    Join Date
    06-13-2012
    Location
    Wales
    MS-Off Ver
    Excel 2003
    Posts
    5

    Football Prediction help!!

    Hello everyone,

    I’m trying to write a formula that will automatically take a group of football scores, compare them with a set of predictions and then calculate points based off a set point system.

    Example:

    Liverpool 4 – 1 Wigan
    Predicted: 3 – 1
    Points: 3

    I’ve been searching online for weeks and week and have been trying to import the findings onto my spreadsheet but I’m failing miserably!!

    I’ve attached the excel spreadsheet below and would be forever grateful if one of you could help me with this.

    On the spreadsheet I’ve added the predictions, the point system and my attempt at the formula.

    Would be grateful for all replies.

    Thanks.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: Football Prediction help!!

    Lets assume the two scores are in cells B1 and C1
    Lets assume the predictions are in cells B2 and C2

    This formula works:
    =IF(AND(B1=B2,C1=C2),5,IF(OR(AND(B1>C1,B2>C2),AND(C1>B1,C2>B2)),3,IF(AND(B2<>B1,C2<>C1),0,1)))
    The first part of the formula is straightforward. Points = 5
    The middle section is to determine the winning team. Points =3
    The next section is when you don't pick either team correctly. Points = 0
    What ever doesn't match any of the other conditions. Points = 1

    Kirk
    Click on star (*) below if this helps

  3. #3
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: Football Prediction help!!

    Because the data in your particular case are not in B1, B2, C1 and C2. Put this formula in cell L3:
    =IF(AND($D3=I3,$F3=J3),5,IF(OR(AND($D3>$F3,I3>J3),AND($F3>$D3,J3>I3)),3,IF(AND($D3<>I3,$F3<>J3),0,1)))
    Copy this formula from row 3 to row 12

    The dollar sign ($) in front of the D and F is to make the column reference absolute so you can copy this formula to the Clive, Tommy, Stephen, Tom H and Tom S columns

    Please mark the title as [SOLVED] if this solves your problem. Please check the star at the bottom of this message, if this was helpful

    Kirk

  4. #4
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: Football Prediction help!!

    Neither your formula nor mine addresses ties.

    The formula I developed awards five points for a tie with the correct prediction on number of goals but zero points for ties with incorrect number of goals. For example, what should be awarded if you predict a tie 2-2 and the score is 1-1? Zero or some other amount?

  5. #5
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: Football Prediction help!!

    Attached file updated with formulas


    Need Help.xls

  6. #6
    Registered User
    Join Date
    06-13-2012
    Location
    Wales
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Football Prediction help!!

    Quote Originally Posted by K m View Post
    Neither your formula nor mine addresses ties.

    The formula I developed awards five points for a tie with the correct prediction on number of goals but zero points for ties with incorrect number of goals. For example, what should be awarded if you predict a tie 2-2 and the score is 1-1? Zero or some other amount?
    If a draw has happened where I predicted 2-2 but it ended up being 1-1 is 3points as the result would have been correctly predicted but not the score. What should I add in order to give this a 3pointer to the excel spreadsheet you have posted?

    Thanks by the way, massively appreciate this!!

  7. #7
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: Football Prediction help!!

    Change the formula in L3 to:
    =IF(I3="","",IF(AND($D3=I3,$F3=J3),5,IF(OR(AND($D3>$F3,I3>J3),AND($F3>$D3,J3>I3),AND($F3=$D3,J3=I3)),3,IF(AND($D3<>I3,$F3<>J3),0,1))))
    Copy formula down and to the other columns


    Be sure to mark the subject as [SOLVED] if this solves your problem and click on the star below to indicate that I was able to help

    Kirk

  8. #8
    Registered User
    Join Date
    06-13-2012
    Location
    Wales
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Football Prediction help!!

    Brilliant.

    One more question (sorry) is there anyway of the banker field being incorporated to get double points or will I have to add that in myself?

    Say my banker was Liverpool vs Chelsea:

    My prediction:
    Liverpool 2 - 1 Chelsea
    Result:
    Liverpool 3 - 1 Chelsea

    Normally that would be 3 points, but with a banker (double points) that would make it 6 points.

    No worries if not as this is just a small thing.

    Thanks alot.

  9. #9
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: Football Prediction help!!

    I don't understand what banker's points are. I don't know soccer lingo. If you can explain it I can do it.
    How does one earn banker's points?

  10. #10
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: Football Prediction help!!

    By the way, dis you notice, I added this to the front part of the equation =IF(I3="","",
    Without it, the program "assumes" a zero in the cell and awards points accordingly

  11. #11
    Registered User
    Join Date
    06-13-2012
    Location
    Wales
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Football Prediction help!!

    Sorry mate, poor explanation.

    The points are based as such:

    Points
    5points Correct Result & Score
    3points Correct Result
    1point Correct Home Score
    1point Correct Away Score
    0point An incorrect prediction
    5points Banker - Double your points on one game.

    How the banker system works is as such.

    In a list of predictions you'd pick one game to be your "banker" the banker being a chance to double your points if you manage to get any points from your prediction.

    My predictions
    Liverpool 2 - 1 Chelsea (BANKER)
    Arsenal 3 - 2 Spurs
    Wigan 2 - 2 United
    Reading 0 - 4 Swansea

    As you can see, in my predictions above the Liverpool/Chelsea game is the game I've chosen to be my banker (a chance to double my points)

    Actual Results:
    Liverpool 3 - 1 Chelsea (BANKER)
    Arsenal 1 - 2 Spurs
    Wigan 0 - 2 United
    Reading 0 - 0 Swansea

    Liverpool won the game, therefore usually I'd only score 3points, however, because this was my banker (double points) I will now get 6points.

    Hope this cleared things up abit.

  12. #12
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: Football Prediction help!!

    Put this in cell L3:
    =IF(I3="","",IF(AND($D3=I3,$F3=J3),5,IF(OR(AND($D3>$F3,I3>J3),AND($F3>$D3,J3>I3),AND($F3=$D3,J3=I3)),3,IF(AND($D3<>I3,$F3<>J3),0,1)))*IF(M3<>"",2,1))
    Copy down and copy to the other columns as appropriate


    The is formula broken down this way:

    =IF(I3="","", {Check to make sure there is some data, if not return a blank}

    IF(AND($D3=I3,$F3=J3),5 {If both value are correct, award a 5}

    IF(OR(AND($D3>$F3,I3>J3),AND($F3>$D3,J3>I3),AND($F3=$D3,J3=I3)),3 {Check to see if you predicted the winner or tie correctly. If so, award 3 points}

    IF(AND($D3<>I3,$F3<>J3),0,1 {If you didn't get anything right, award zero or null points, else award one point}

    *IF(M3<>"",2,1)) {Either multiply by two or one depending whether you put something in the Banker column}

    Be sure to mark the subject as [SOLVED] if this solves your problem and click on the star below to indicate that I was able to help


    Kirk








    If you put anything in the banker column, the result is multiplied times two

  13. #13
    Registered User
    Join Date
    06-13-2012
    Location
    Wales
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Football Prediction help!!

    It works!! Thanks alot, and thank you for giving a step by step as to what the formula does.

    Really appreciate this.

  14. #14
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: Football Prediction help!!

    If this helped change the title to [SOLVED]

    Click on the star at the bottom left hand side of this message to increase my reputation points

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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