1. #1
    OMGRandyJackson
    OMGRandyJackson's Avatar Become A Pro!
    Join Date: 02-07-10
    Posts: 1,680
    Betpoints: 4054

    Excel Question relating to Odds

    For my spreadsheet, I currently use American Odds format to display the odds of a wager. I absolutely hate decimal odds and would prefer not to use them. Currently I enter the American Odds, then the bet amount and to win amount manually, however I want to begin to automate this process, meaning that as soon as my bet amount is entered, the to win amount automatically fills in. My excel skills have become rusty over the last year and I am spacing on how to do this.

    I easily got if the odds are +100.

    For example, C column is odds, D column is bet amount and E column is Win amount. So my formula is:

    =IF(C8>=100,D8*(C8/100))

    So if odds are +120, bet amount is $5, to win shows $6


    The negative odds is where it's getting tricky, I currently have:

    =IF(C9<=100,D9*(100/C9))

    So if odds are -125, bet amount is $5, to win shows -$4.

    The problem is, the amount should be $4. How do I get $4 to show?


    Also quick question for my odds column, is it possible to have the + sign show in front of the positive number?

    NVM Got it figured out I am an idiot lol.

    New formula is simply:

    =IF(C8>=100,D8*C8/100,(D8*100/C8)*-1)

    As for + sign in font of numbers, I went to format, custom and typed +0;-0;0

    Derp lol
    Last edited by OMGRandyJackson; 06-17-14 at 01:01 PM.

  2. #2
    akphidelt
    akphidelt's Avatar Become A Pro!
    Join Date: 07-24-11
    Posts: 1,228
    Betpoints: 640

    Since this is a Think Tank for different ways of doing things, just thought I show how to make this in to a custom function to use in any sheet.

    1) Go to Visual Basic (either through the Developer Tab or Alt + F11
    2) Click Insert -> Module
    3) Create the Function...

    Code:
    Function ToWin(line, betAmt)
    
    If line >= 100 Then
     ToWin = betAmt * line / 100
    Else
     ToWin = (betAmt * 100 / line) * -1
    End If
    
    End Function
    Now if you ever need the result you can type in the cell... =ToWin(C8,D8)

  3. #3
    OMGRandyJackson
    OMGRandyJackson's Avatar Become A Pro!
    Join Date: 02-07-10
    Posts: 1,680
    Betpoints: 4054

    Ah interesting, Ill have to experiment with that tomorrow, thanks! Also just posted it here because I was not sure what section would be best and figured here, Id get at least good answers lol.

Top