+ Reply to Thread
Results 1 to 3 of 3

Is there a better way than many If statements ? (Solved)

  1. #1
    Registered User
    Join Date
    09-13-2015
    Location
    usa
    MS-Off Ver
    2010
    Posts
    5

    Is there a better way than many If statements ? (Solved)

    What I'm attempting to do is keep track of some gambling bets (no judgment please) and hoping excel can help me easily do that. The main problem I'm having is how to keep track of money won and lost per bet.

    If team A is favored by a negative amount (ex -110) that means if team A is selected and they win, I'd win 100. If they lose, I lose 110

    If team B is an underdog they have a positive amount (ex +120) so if they are selected and win, id win 120 and if they lose, I'd lose 100

    Third option is a push - no money changes hands.


    So what I'm doing is listing the team I take (no help needed), the amount wagered (no help needed) and the negative or positive numbers as listed above in the examples (again, I can type this) but in a 4th column when I type W, L or P (win loss or push), I'd like the 5th column to compute my result. Can anyone help with this please?

    The scenarios are, IF D1="w" & IF C1>0, then the result is E1=.01*B1*C1
    But if D1="w" & C1<0, then the result is E1=B1

    If d1="L" & C1>0, then E1=b1*-1
    And if D1="L" & C1<0, E1=.01*B1*c1

    If d1="p", E1=0


    What I don't know how to do is, to have two conditions with an IF statement (if A loses & If A is an underdog), I also don't know of a better formula or function to use. Can anyone please help?
    Thanks in advance
    Last edited by m.gold; 09-19-2016 at 10:03 PM.

  2. #2
    Forum Contributor
    Join Date
    10-30-2014
    Location
    England
    MS-Off Ver
    2007 / 365
    Posts
    279

    Re: Is there a better way than many If statements ?

    Quote Originally Posted by m.gold View Post
    What I don't know how to do is, to have two conditions with an IF statement (if A loses & If A is an underdog), I also don't know of a better formula or function to use.
    Thanks in advance
    Just wrap your arguments in an AND() function within the logical test part of the IF() function...

    IF( AND(A loses , A is an underdog) , VALUE IF TRUE , VALUE IF FALSE )

  3. #3
    Registered User
    Join Date
    09-13-2015
    Location
    usa
    MS-Off Ver
    2010
    Posts
    5
    Quote Originally Posted by EchoPassenger View Post
    Just wrap your arguments in an AND() function within the logical test part of the IF() function...

    IF( AND(A loses , A is an underdog) , VALUE IF TRUE , VALUE IF FALSE )

    That worked perfectly
    Thanks for the help and education

+ 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. [SOLVED] Nested if statements containing multiple and statements
    By John M. in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-22-2014, 11:48 PM
  2. Reading If statements and formulating values from if statements
    By crnam in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-16-2013, 05:20 AM
  3. questions with if statements and nested if statements
    By Pat Excel in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 02-03-2013, 01:41 PM
  4. Multiple nested IF statements and AND statements
    By TonyGetz in forum Excel General
    Replies: 2
    Last Post: 12-14-2010, 03:07 AM
  5. Nested If statements / logic statements
    By Brainless_09 in forum Excel General
    Replies: 3
    Last Post: 06-17-2009, 02:59 PM
  6. Replies: 12
    Last Post: 05-15-2009, 08:38 AM
  7. [SOLVED] operator statements, shorting when reusing one of the statements?
    By KR in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-04-2005, 02:05 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