+ Reply to Thread
Results 1 to 7 of 7

Rand Formula

  1. #1
    Registered User
    Join Date
    06-14-2014
    Posts
    24

    Rand Formula

    This is multiple questions. I am working with the RAND formula and a coin toss with multiple simulations to formulate.
    A player rolls two six-sided dice 20 times. Each die shows the numbers between 1-6. The dice are "FAIR" meaning that the numbers 1-6 can be rolled with equal probability. If the outcome on both dice is DOUBLES the player wins $5, if it is 7 or 11 they win $3, otherwise they lose $1. I need to put a separate cell for each dice rolled and for the amount they win or lose for 20 rolls. Here is what I have so far
    =if(RAND()=Doubles,"Win $5",IF(Rand()=7 or 11, "Win $3, IF(Rand()<7,11,doubles, "Lose $1"))).

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Rand Formula

    You could use
    =RANDBETWEEN(1,6) to get the number on each dice, so you would need one cell for each dice and then if a1 is dice 1 and b1 is dice 2 you would get
    IF(A1=B1,"WIN $5",IF(OR(A1+B1=7,A1+B1=11),"WIN $3","LOSE $1"))

    Be careful though because the rand and randbetween formulae will recalculate the number everytime you calculate the worksheet.

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,065

    Re: Rand Formula

    in A1 first die rolled
    =INT(RAND()*12)+1
    in B1 second die rolled
    =INT(RAND()*12)+1

    in C1
    =IF(A1=B1,"Doubles",IF(OR(A1+B1=7,A1+B1=11),"Win $3","Lose $1"))
    in D1
    =IF(A1=B1,5,IF(OR(A1+B1=7,A1+B1=11),3,-1))
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Registered User
    Join Date
    06-14-2014
    Posts
    24

    Re: Rand Formula

    Thank you, I will try this.

  5. #5
    Registered User
    Join Date
    06-14-2014
    Posts
    24

    Re: Rand Formula

    I am sorry I will try and be more specific. Thank you.

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Rand Formula

    Hi Jackie,

    See the attached for how I think you should do this problem.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  7. #7
    Registered User
    Join Date
    06-14-2014
    Posts
    24

    Re: Rand Formula

    Marvin perfect! thank you.

+ 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. Trying to add to a Rand formula to allocate tasks/units
    By Holly123 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-11-2013, 10:44 PM
  2. Excel 2007 : RAND formula
    By Confusedcious in forum Excel General
    Replies: 1
    Last Post: 09-02-2010, 09:35 AM
  3. What is the formula behind =rand()??
    By davidsea5 in forum Excel General
    Replies: 1
    Last Post: 03-31-2009, 10:48 AM
  4. Creating a formula using RAND
    By hbb2699 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-15-2006, 12:55 PM
  5. Rand()
    By Asphalt-1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-10-2006, 03:20 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