How to Create list of random numbers which gives specific total value?

sinivasan

New Member
Joined
Jul 14, 2014
Messages
6
How to get specific total as sum of randomly(using randbetween/rand()) generated values?

I always want to get specific value as the sum of randomly generated values

For example I have sheet as shown below.
[TABLE="class: grid, width: 250, align: left"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD] =RANDBETWEEN(5,10)[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD] =RANDBETWEEN(5,10)[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD] =RANDBETWEEN(5,10)[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD] =RANDBETWEEN(5,10)[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD] =RANDBETWEEN(5,10)[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD] =RANDBETWEEN(5,10)[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD] =RANDBETWEEN(5,10)[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD] =RANDBETWEEN(5,10)[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD] =RANDBETWEEN(5,10)[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD] =RANDBETWEEN(5,10)[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD] =SUM(B1:B10)[/TD]
[TD]70[/TD]
[/TR]
</tbody>[/TABLE]

From the above sheet(table) I want to get specific value as the sum of value in Column B(B1:B10 contains =RANDBETWEEN(5,10))

If I want to get 92 as my sum of randomly generated value the excel should populate the random values in column B which gives sum of 92.

How do I do it?
Could someone help me please!
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Put =RAND() in some cells (A1:A10) for example
Put your target value, 92 in B1

put =A1*$B$1/SUM($A$1:$A$10) in C1 and drag down to C10.

C1:C10 are your random numbers that sum to 92.
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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