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.
AB
1 =RANDBETWEEN(5,10)5
2 =RANDBETWEEN(5,10)6
3 =RANDBETWEEN(5,10)7
4 =RANDBETWEEN(5,10)6
5 =RANDBETWEEN(5,10)9
6 =RANDBETWEEN(5,10)7
7 =RANDBETWEEN(5,10)10
8 =RANDBETWEEN(5,10)5
9 =RANDBETWEEN(5,10)6
10 =RANDBETWEEN(5,10)9
11 =SUM(B1:B10)70

<tbody>
</tbody>

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

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
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
Thanks a lot mikerickson!
I really appreciate your contribution.
I got what I wanted, thanks much!:cool:
 
Upvote 0

Forum statistics

Threads
1,214,950
Messages
6,122,438
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