+ Reply to Thread
Results 1 to 15 of 15

Complex IF Statement?

  1. #1
    Registered User
    Join Date
    04-07-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Complex IF Statement?

    Basically I think I need a very complex IF statement to achieve my goal

    Looking for a cell to display certain criteria (WIN, LOST, PUSH, 1/2 WIN 1/2 VOID, 1/2 VOID 1/2 LOST) based on numerical values

    EXAMPLE:

    In a soccer match if you bet Over 3 goals and there are 4 goals in the game you WIN. If there are 2 goals you LOSE. If there are exactly 3 you get your stake back, this is called PUSH

    I need an IF statement that will allow me to display: (I have a slider with values that are increasing by 0.25)

    Goals in game > Value in cell = WIN
    Goals in game < Value in cell = LOST
    Goals in game = Value in cell = PUSH

    Thats the easy bit i think i.e 4 goals in a a game, Over 3 is WIN, 4 goals in a game. Over 4 is PUSH, etc

    Now is where Im struggling...

    You can bet on 3.25 goals in the game. If there are 3 your bet is 1/2 VOID 1/2 LOST. Think about it as when you have a decimal say 3.25, this really equals two values that are +/- 0.25 the slider value so 3.25 = 3 & 3.5.

    1/2 of your bet goes on 3 and the other 1/2 goes on 3.5

    Then this reverts back to the previous example where

    Goals In Game 3, Slider 3 = Void (Push and void are the same thing so this can display void if needs be)
    Goals In Game 3, Slider 3.5 = Lost

    This creates 1/2 Void 1/2 Lost

    EXAMPLES

    GIG 3, Slider 3.5 = Lost
    GIG 3, Slider 3.25 = 1/2 Void 1/2 Lost
    GIG 3, Slider 3 = Void (Push)
    GIG 3, Slider 2.75 = 1/2 Win 1/2 Void
    GIG 3, Slider 2.5 = Win

    GIG 2, Slider 3 = Lost
    GIG 3, Slider 3 = Void
    GIG 4, Slider 3 = Win
    GIG 1, Slider 3 = Lost

    Any help with this? (Very tricky...)

    Thanks

  2. #2
    Registered User
    Join Date
    03-26-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Complex IF Statement?

    If you don't mind it as a lookup table instead of an IF statement then the attached spreadsheet should work.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    04-07-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Complex IF Statement?

    Ok Ive cracked it. Used link cells with the slider where I have added or subtracted 0.25 from the slider value so I now have two cells with values that makes it easier to meet the conditions.

    Now I need to combine the following criteria into a statement

    Win --- J8 > A11 AND J8 > B11

    1/2 Win 1/2 Void --- J8 > A11 AND J8 = B11

    Push ---J8 = B8

    1/2 Void 1/2 Lost --- J8 = A11 AND J8 < B11

    Lost --- J8 < A11 AND J8 < B11

    Possible?

  4. #4
    Registered User
    Join Date
    04-07-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Complex IF Statement?

    Quote Originally Posted by Down Under View Post
    If you don't mind it as a lookup table instead of an IF statement then the attached spreadsheet should work.

    This also works great by the way thanks! If the IF statement doesnt work this is just fine.

  5. #5
    Registered User
    Join Date
    03-26-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Complex IF Statement?

    Out of curiosity, are you trying to look at how the IF statement would work for learning purposes, or are you just trying to avoid having to put in a table if possible? If it's the latter, you can code the lookup formula into a single cell statement without the table. Just put this into c2:

    =LOOKUP(B2-A2,{-50,-0.25,0,0.25,0.5},{"Lost","Half Lost/Half Push","Push","Half Win/Half Push","Win"})

  6. #6
    Registered User
    Join Date
    04-07-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Complex IF Statement?

    With the table at the moment it is not working for higher values such as 0 goals in a game Over 3. Will this formula fix that?

  7. #7
    Registered User
    Join Date
    03-26-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Complex IF Statement?

    Yes it will. Alternatively, in the table where it says -0.50, change the value to -50.

  8. #8
    Registered User
    Join Date
    04-07-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Complex IF Statement?

    Also out of curiosity is there an IF statement that will combine my criteria earlier?

  9. #9
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Complex IF Statement?

    I think this translates your Post #3 statements into the IF() function you're looking for:
    =IF(AND(J8>A11,J8>B11),"Win",IF(AND(J8>A11,J8=B11),"1/2 Win 1/2 Void",IF(J8=B8,"Push",IF(AND(J8=A11,J8<B11),"1/2 Void 1/2 Lost","Lost"))))

  10. #10
    Registered User
    Join Date
    04-07-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Complex IF Statement?

    Awesome thanks!

  11. #11
    Registered User
    Join Date
    04-07-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Complex IF Statement?

    So I have done the Goal Line ok, now looking for Asian Handicap

    Looking for a LOOKUP suitable to display the correct participants in this?
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    03-26-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Complex IF Statement?

    Based on what you have provided I think this is what you are looking for. I've assumed if a bet of Over 3.5 goals is made with the score at 1-0, that the bet is for an additional 3.5 (I.e. The equivalent Betfair market would be Total Goals O/U 4.5). I say this because most of the in play goal line betting I see is based on total goals rather than total additional goals and unlike handicap betting the current score doesn't really matter as it is expressed in total terms and has no conditional factors the way handicap resulting does.

    However, I don't understand anything about scrollers, or how the cells in J, K and L work. For my own curiosity, can you explain how they work?

    P.S. In cells D3 and D4 you need to put brackets around G3+H3 -- I neglected to do this in the spreadsheet
    Attached Files Attached Files
    Last edited by Down Under; 04-08-2012 at 11:51 AM.

  13. #13
    Registered User
    Join Date
    04-07-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Complex IF Statement?

    You are correct Current Score does not play a part with Goal Line IP (previous goals scored are taken into account no matter what).

    This looks fantastic by the way I will test it some more but this looks exactly what I am after.

    The cell in J is the GL scroller value, then the values you see in column C are that value *0.25

    The cell in K is the total goals in the match added, but that was for my IF formula I dont believe it is relavent with the LOOKUP.

    The cell in L is the AH scroller value but because you cant have negative values I subtracted 30 from the value and multipled this by 0.25. This displayed the fav handicaps. Conversely negating this new cell (C7) gives the dog handicaps. +0.25 etc

    Thanks for all your help, like I said this looks spot on

  14. #14
    Registered User
    Join Date
    03-26-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Complex IF Statement?

    No problems, thanks for explaining the scroller and the related cells. I honestly hadn't seen it before.

    Just on the goal markets things, there's no need to put it in brackets like I said before given you are just talking total goals, so how it was should be fine. Given it's an absolute thing and not dependent on the score at the time of the bet it should be pretty simple.

    I think I've got my head around what it is you are doing so if there are any errors just let me know and I should be able to correct them.

  15. #15
    Registered User
    Join Date
    04-07-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Complex IF Statement?

    Yea correct score is simply there for the AH. So for goal line I can use the cell in K (which is final score total goals) and subtract the goal line as previous.

    Really appreciate the time mate it is complicated I didnt know where to begin!

+ 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