Sum up n randomly selected cells

flixi

New Member
Joined
Oct 20, 2017
Messages
1
I have the following problem:
I have one column with integers (from a binomial distribution) to which I will refer as "n". In a second sheet, I have another column of values (from a cost analysis). Now I want Excel to randomly pick n-cells (n = a given integer) from sheet 2 and sum-them up (within one cell if possible)
Is this possible?
So far I have managed to tell Excel to pick one random cell from sheet 2, or 5 times the same (but not 5 different ones)...


Thank you very much for your support!!!
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Welcome to the Forum!

Here's how you can calculate the sum of n random values:

B2: =RAND() copy down
n: = E3
E4: =SUMPRODUCT(--(B2:B11<=SMALL(B2:B11,n)),A2:A11)

I'm unclear though how this random number n relates to your binomial distribution in Sheet1?


Excel 2010
ABCDEF
1ValuesRandom
210.718
320.982Sum of5numbers
460.485Random total124
540.508
670.089
7120.127
830.989
9550.069
10220.979
11440.385
Sheet2
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,287
Members
452,631
Latest member
a_potato

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