lundi 25 mars 2019

RAND gives #n/a

in excel I have

Sex   Probability     Cumulative Prob
M     80%             80%
F     20%             100%

These are in a sheet called probability of Client and run from cells E1:G3.

In another worksheet i have put the below formula in. Most of the time the result is #N/A with the occasional 'M'. How can i choose this so either M or F is picked in line with the probability above.

=INDEX('Probability of client'!$E$2:$E$3,MATCH(RAND(),'Probability of client'!$G$2:$G$3))

thanks




Aucun commentaire:

Enregistrer un commentaire