I would like to make a formula that can essentially calculate an average output of a dice roll, think Dungeons and Dragons.
I want to use a single formula to calculate any possible roll, using each number as in input. If I want to calculate a roll of a 1d3+2, I can use =RANDBETWEEN(1,3)+2, but how would I be able to calculate a 2d3 roll without having to edit the formula? How would I go about executing RANDBETWEEN() an arbitrary amount of times within one formula?
The plan is to be able to use this for possibly hundreds and thousands of rolls, so I would like to avoid filling rows and rows with formulas, I plan to use different rolls as rows, and multiple different possibilities as columns so I would also like to save space. Here is what I have so far but as you can see, the formula for each roll will not suffice for more than a single dice.
I am willing to take no for an answer, I could create a solution in VBA if I had to, but I'd like to know if Excel can handle this for simplicity's sake.