Percentage chance to hit target number, A1+variable

miinstrel

New Member
Joined
Aug 26, 2010
Messages
28
Office Version
  1. 2021
Platform
  1. Windows
Hi all -

Here is my spreadsheet:

mkifKqD_spreadsheet%20example.jpg


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 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.

Thank you in advance for any insight you can provide. I'll be checking regularly if you need more information or clarification from me.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
is it me or is not a 5% chance of landing on any side of a 20 sided dice?

This variation does does not change with reference to what you are rolling against.

The odds will not change.
 
Upvote 0
The numbers in columns C and E will both be changing frequently. E4 might be 23, E6 might be 42, C5 might change to 11... i'll be entering those target number and modifiers manually as the situation changes.

And sorry, when I said above "Yes this roll will be equal to or greater than 18" I should have said "Yes this roll plus the modifier in column C will be equal to or greater than 18"
 
Last edited:
Upvote 0
Figured it out... I was making this way more difficult than it needed to be:

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

That stops it from going below 0% success, over 95% success, and works perfectly. probably a simpler way to do it but this works just fine :)

Problem solved, thanks.
 
Upvote 0
This does the same thing:

=MEDIAN((20-E22+C22)/20, 0, 0.95)
 
Upvote 0

Forum statistics

Threads
1,224,583
Messages
6,179,678
Members
452,937
Latest member
Bhg1984

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top