Geneate Random Numbers within Range having fixed total

milindighe

New Member
Joined
Jun 2, 2020
Messages
2
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
I have, Total no. of Boxes, Total no. of items that goes in boxes and each box can have Min and Max count.
For Example,
If Total Boxes = 80, Total No. of Items = 240, and each box can have Minimum 5 and Maximum 10 Items.
So, I have to generate a table of 80 boxes, where 240 items are distributed. And each box can have Min 5 and Max 10 items.
How to generate such table with random items between 5 to 10 among 80 boxes whose total is 240?
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
I have to generate a table of 80 boxes, where 240 items are distributed. And each box can have Min 5 and Max 10 items.

Sounds like a trick question on a class assignment or test. The answer is: it cannot be done!

With a minimum of 5, the number of boxes required is 240/5 = 48, not 80.
 
Upvote 0
Sounds like a trick question on a class assignment or test. The answer is: it cannot be done!

With a minimum of 5, the number of boxes required is 240/5 = 48, not 80.

Hi joeu2004!
I have given numbers just as an example. Actual numbers will be always more realistic and within a ratio.
However, yesterday night, I figured out the solution!
Thanks for replying and Have a nice day!
 
Upvote 0
Hi joeu2004!
I have given numbers just as an example. Actual numbers will be always more realistic and within a ratio.
However, yesterday night, I figured out the solution!
Thanks for replying and Have a nice day!
What is your solution, please?
 
Upvote 0

Forum statistics

Threads
1,214,951
Messages
6,122,446
Members
449,083
Latest member
Ava19

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