+ Reply to Thread
Results 1 to 4 of 4

Percentage chance to hit target number

  1. #1
    Registered User
    Join Date
    01-20-2011
    Location
    Portland, OR, USA
    MS-Off Ver
    Excel 2007
    Posts
    17

    Percentage chance to hit target number

    Hi all -

    Here is my spreadsheet:

    \1

    What I need to do is calculate in column F the percentage chance of someone rolling a 20 sided die and achieving a number greater than or equal to the number in column E after adding the bonus on the same line in column C. So for example, in order to get at least 18, as shown on line 5, the player would need to roll X+7.

    What I THINK needs to happen is have excel check C5+H3,C5+H4,...C5+H22, determine how many "Yes this roll plus the modifier in column C will be equal to or greater than 18" there are, and then divide by 20. That's how it will seem to work in my mind at least.

    The percent chance of success is capped at 95%, so even if all 20 rolls would beat the number in column E, there is still a 5% chance of failure.

    I will be changing the numbers in columns C and E frequently as the situation changes.

    Thank you in advance for any insight you can provide. I'll be checking regularly if you need more information or clarification from me.
    Last edited by miinstrel; 04-09-2011 at 06:04 PM.

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

    Re: Percentage chance to hit target number

    Without giving it a lot of thought, would it be (for F5):

    =(20-E5+C5)*5% and formatted as %

  3. #3
    Registered User
    Join Date
    01-20-2011
    Location
    Portland, OR, USA
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Percentage chance to hit target number

    ... actually yes. yes, that would be it exactly... i was making this WAY more complicated than it needed to be. thank you


    Here's my final formula to set the max 95% success rate and also to stop it from going below 0%.

    Not sure if there's a way to simplify it, but this works so there's really no need.

    =IF(((20-E22+C22)*0.05)<=0,0,IF(((20-E22+C22)*0.05)>0.95,0.95,((20-E22+C22)*0.05)))

    have a great weekend!

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

    Re: Percentage chance to hit target number

    Using what I gave you:

    =IF((20-E5+C5)*5%<0,0,MIN((20-E5+C5)*5%,0.95))

    or even

    =MAX(0,MIN((20-E5+C5)*5%,0.95))

    I'm watching The Masters so, yes, I'm having a great weekend!

    Don't forget to mark your thread as SOLVED - (click on FAQ at top of page for directions if needed).
    Last edited by Cutter; 04-09-2011 at 07:10 PM.

+ 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