ilmatthias
New Member
- Joined
- Jul 16, 2015
- Messages
- 2
Using Windows 7 and Excel 2013.
I'm trying to create a function to facilitate table top role-playing (i.e. Dungeons & Dragons). I want the formula to accomplish a randbetween for a specified number of times.
I would also like the formula to be non-volatile (i.e. doesn't recalculate every time I do something else in Excel).
As a bonus, I would love to be able to change the die being rolled (e.g. a 6-sided die, 20-sided die, etc.).
So far, I've been able to cobble together a formula that rolls a only a set die (d20) and that is also non-volatile.
Function Die20()
Low = 1
High = 20
Randomize
Die20 = Int(Rnd * (High + 1 - Low)) + Low
End Function
At the least, I would like to be able to type =Die20(3) and have it basically return the result of randbetween(1,20)+randbetween(1,20)+randbetween(1,20).
At the most, I would like to be able to change the high range number so that it looks like =Die(6,3) and it returns the result of randbetween(1,6)+randbetween(1,6)+randbetween(1,6), without recalculating the formula when I do other things in excel.
What I'm NOT looking for is a function that multiplies one randbetween result (e.g. =ranbetween(1,20)*3) because that multiplies 1 roll, not adds 3 distinct rolls.
Any help you guys can give me would be appreciated! Thanks!
I'm trying to create a function to facilitate table top role-playing (i.e. Dungeons & Dragons). I want the formula to accomplish a randbetween for a specified number of times.
I would also like the formula to be non-volatile (i.e. doesn't recalculate every time I do something else in Excel).
As a bonus, I would love to be able to change the die being rolled (e.g. a 6-sided die, 20-sided die, etc.).
So far, I've been able to cobble together a formula that rolls a only a set die (d20) and that is also non-volatile.
Function Die20()
Low = 1
High = 20
Randomize
Die20 = Int(Rnd * (High + 1 - Low)) + Low
End Function
At the least, I would like to be able to type =Die20(3) and have it basically return the result of randbetween(1,20)+randbetween(1,20)+randbetween(1,20).
At the most, I would like to be able to change the high range number so that it looks like =Die(6,3) and it returns the result of randbetween(1,6)+randbetween(1,6)+randbetween(1,6), without recalculating the formula when I do other things in excel.
What I'm NOT looking for is a function that multiplies one randbetween result (e.g. =ranbetween(1,20)*3) because that multiplies 1 roll, not adds 3 distinct rolls.
Any help you guys can give me would be appreciated! Thanks!