Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
random integer with sum constraint
Hi
I want to generate two random integers that fall within a certain range ("min" to "max", e.g. 0 to 10) AND that sum to equal no more than a given value ("maxsum", e.g. 19) The first integer is easy (using a Analysis Toolpak add-in) A1=RANDBETWEEN(min, max) But that second integer has me stuck. I started with A2=RANDBETWEEN(min, maxsum-A1) but then a lot of the results were larger than "max." Oops. Any ideas on what else I need to put in there? Thanks, Karin |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I add an integer to an existing integer? | Excel Worksheet Functions | |||
Random Integer | New Users to Excel | |||
Adding a constraint. | Excel Discussion (Misc queries) | |||
cell value constraint | Excel Discussion (Misc queries) | |||
Definition of integer constraint | New Users to Excel |