mardi 20 septembre 2016

Random number generator not working with the sumproduct function

I would like to write a single formula that is able to calculate "n" randomly generated figures, as well as average them, where n is determined by a changing reference cell.

the current formula I am using is this:

=(SUMPRODUCT((ROW(1:6)*RAND()/ROW(1:6))/6

however, the random number is only generated once and is being used in all 6 terms. Note in this case my n=6, hence I would like six randomly generated numbers being created inside the formula.

I used the following function to establish if only one random number was being generated:

=(SUMPRODUCT((ROW(1:6)*(IF(RAND()<1-0,3;(1-0,3);0,3))/ROW(1:6))/6

The final product would always be 0,3 or 0,7 and therefore confirming the fact

Any help would be greatly appreciated




Aucun commentaire:

Enregistrer un commentaire